How to aggregate array of data (not collection)?

I have an array of data that I have put together from various collections. Is there a way to perform the same as an aggregate function on this new array?