@brief converts collection into an array `collection.toArray()` Converts the collection into an array of documents. Never use this call in a production environment.