Added array support in all aggregates
Added array support for replacement