Add method collectionToArray