A Dance of Many Dimensions
Languages with built-in solutions

based on this proposal by xnor

APL (Dyalog Unicode), 1 byte



⍉


Try it online!

J, 2 bytes

|:


Try it online!

R, 5 bytes



aperm


Try it online!

Octave/MATLAB, 8 bytes



@permute


Try it online!

Wolfram Language (Mathematica), 9 bytes

Transpose


Try it online!

Julia, 11 bytes



permutedims


Try it online!