Handle empty arrays