toArray-function.

Returns a clean array of elements.