Run trim before array_unique