Create a n-dimensional array with given value