Handle empty arrays in the subscript operator