added allocator support for arrays