fix bogus iteration

The loop should iterate over the array objects but not over enumerable properties.