Properly handle array search values