To avoid memory issues with array paginator for bigger collections, use pagination based on MongoCursor object. Example implementation: https://github.com/arius86/core/blob/v1.1/src/Paginator/Adapter/Mongo.php