Use #map to build the array

Removes the anti-pattern of iteratively building a collection.