Separated pagination functionality into PaginatedArrayMixin
Several improvements based on feedback from stefanpenner