You can make your collection go through an iterator after you convert to an array.
toArray() will help you.
toArray()