Reconfigured the types for Array2D and Array3D