return collection as an array