Implementation of templatized and allocator-based version of array in C++