Update array2d.hpp

fix bug, forgot to change some stuff after removing std::vector dependency