For the purposes of this task, the actual memory layout or access method of this data structure is not mandated.

It is enough to:

 State the number and extent of each index to the array.
 Provide specific, ordered, integer indices for all dimensions of the array together with a new value to update the indexed value.
 Provide specific, ordered, numeric indices for all dimensions of the array to obtain the arrays value at that indexed position.


Task

 State if the language supports multi-dimensional arrays in its syntax and usual implementation.
 State whether the language uses row-major or column major order for multi-dimensional array storage, or any other relevant kind of storage.
 Show how to create a four dimensional array in your language and set, access, set to another value; and access the new value of an integer-indexed item of the array.
 The idiomatic method for the language is preferred.
 The array should allow a range of five, four, three and two (or two three four five if convenient), in each of the indices, in order. (For example, if indexing starts at zero for the first index then a range of 0..4 inclusive would suffice).
 State if memory allocation is optimised for the array - especially if contiguous memory is likely to be allocated.
 If the language has exceptional native multi-dimensional array support such as optional bounds checking, reshaping, or being able to state both the lower and upper bounds of index ranges, then this is the task to mention them.


Show all output here, (but you may judiciously use ellipses to shorten repetitive output text).




 
julia> a4d = rand(Int, 5, 4, 3, 2)
5×4×3×2 Array{Int64,4}:
[:, :, 1, 1] =
 -4071410509370082480   -361121233222804742   6884099527706004770  -3207257047234122321
  8613938183523990915  -6284413064884272355   2092274063225757339   2883192477194384468
  8063489472918692884   7817079491035828713   4371491775271354348    276862286105940437
 -1772662642291072402   4809985701129914416   8281858591045636672   8406920023376702651
  5149318914785292575  -1515076735924485336  -3446939844768424035   1325012392213218275
 
[:, :, 2, 1] =
  6880114761106392524   6088903043766771621   3427296371455723937  -3871156425725741320
 -9056731070343072262  -6900689642579036552   6428097039068264082  -8965404397337530418
 -1972367399165031500  -2213273885576423725  -5169665910043775523   4625836493333597033
 -2599106204536686594   8110110151332124377   2213007499408257641  -8439992945948333993
 -5582801554832553928   7198533994867969144  -5086532281938936871  -5785587643130395544
 
[:, :, 3, 1] =
   -17294958981345227  -3894742251505912349   5910938929594406050  -1362996293154965701
  3987219021607448038   6324367415515825846   3745581879541731998   2844758786713062315
 -6091449020940608221   4456121461951632195  -2584728255467516797  -3497659495227813242
 -5928873932509420551  -3918487907573141316   5830965509944713914   8236501134345492283
 -8221039525025311485  -1377489816166018715   3331466694873878620  -6251825104964406539
 
[:, :, 1, 2] =
 -3457374235750853577   5435555757951424162  -2045941319469405317   7328458353379957791
  1713055171323579940   7991986037097235116  -7241088987591638401   1660634030535548686
  4673394669827656364   5361350944786403116  -3165400775730699962  -2786870864776919360
  -936605780936708362  -8663743677584705168   2854140834792323092  -8335310793071345837
 -3681644266158007140   -725263380984390472  -3882196050441743539   3104333567303051945
 
[:, :, 2, 2] =
  6571168566735939900     -2962119128748096  -6995171731724009568  -3311757615633004375
 -2337587211780934167  -4326286389873661148   4350714846343974202   7735721289399158250
 -8213453299747381553  -8821356424402127712  -6240807297203610060  -4705744555934991961
  5320110310888142259   -767643622294485330  -3059460131766056283  -7562911883833519677
 -7578327835336665804  -1125154035165505958   7801099686760373595  -7212481716316687824
 
[:, :, 3, 2] =
  4758459841719113041  -2608915613406792656  -4400228941420712011   8931157241145543293
  7349481815101847836  -1609425280933983575  -4442082290554782826  -7044337833155803104
 -4991211814494456720   6358355341301107435  -7486441622913196485  -1654445042306345503
 -2789599665862904090   2753632931032283690  -1580743162155175963  -5070035295183713618
  6026427076366641381  -2363816652576128818  -7282095369321808360   9097339410999816372
 
julia> a4d[1,1,1,1] = 10
10
 
julia> a4d
5×4×3×2 Array{Int64,4}:
[:, :, 1, 1] =
                   10   -361121233222804742   6884099527706004770  -3207257047234122321
  8613938183523990915  -6284413064884272355   2092274063225757339   2883192477194384468
  8063489472918692884   7817079491035828713   4371491775271354348    276862286105940437
 -1772662642291072402   4809985701129914416   8281858591045636672   8406920023376702651
  5149318914785292575  -1515076735924485336  -3446939844768424035   1325012392213218275
 
[:, :, 2, 1] =
  6880114761106392524   6088903043766771621   3427296371455723937  -3871156425725741320
 -9056731070343072262  -6900689642579036552   6428097039068264082  -8965404397337530418
 -1972367399165031500  -2213273885576423725  -5169665910043775523   4625836493333597033
 -2599106204536686594   8110110151332124377   2213007499408257641  -8439992945948333993
 -5582801554832553928   7198533994867969144  -5086532281938936871  -5785587643130395544
 
[:, :, 3, 1] =
   -17294958981345227  -3894742251505912349   5910938929594406050  -1362996293154965701
  3987219021607448038   6324367415515825846   3745581879541731998   2844758786713062315
 -6091449020940608221   4456121461951632195  -2584728255467516797  -3497659495227813242
 -5928873932509420551  -3918487907573141316   5830965509944713914   8236501134345492283
 -8221039525025311485  -1377489816166018715   3331466694873878620  -6251825104964406539
 
[:, :, 1, 2] =
 -3457374235750853577   5435555757951424162  -2045941319469405317   7328458353379957791
  1713055171323579940   7991986037097235116  -7241088987591638401   1660634030535548686
  4673394669827656364   5361350944786403116  -3165400775730699962  -2786870864776919360
  -936605780936708362  -8663743677584705168   2854140834792323092  -8335310793071345837
 -3681644266158007140   -725263380984390472  -3882196050441743539   3104333567303051945
 
[:, :, 2, 2] =
  6571168566735939900     -2962119128748096  -6995171731724009568  -3311757615633004375
 -2337587211780934167  -4326286389873661148   4350714846343974202   7735721289399158250
 -8213453299747381553  -8821356424402127712  -6240807297203610060  -4705744555934991961
  5320110310888142259   -767643622294485330  -3059460131766056283  -7562911883833519677
 -7578327835336665804  -1125154035165505958   7801099686760373595  -7212481716316687824
 
[:, :, 3, 2] =
  4758459841719113041  -2608915613406792656  -4400228941420712011   8931157241145543293
  7349481815101847836  -1609425280933983575  -4442082290554782826  -7044337833155803104
 -4991211814494456720   6358355341301107435  -7486441622913196485  -1654445042306345503
 -2789599665862904090   2753632931032283690  -1580743162155175963  -5070035295183713618
  6026427076366641381  -2363816652576128818  -7282095369321808360   9097339410999816372
 
julia> a4d[4,3,2,1]
2213007499408257641
 