N-dimensional Array Datastructure on CPU and GPU