I think you're looking for aperm().
If we use a smaller 3-way arrays to visualize what's happening:
x <- array(1:6, 1:3)
x
#, , 1
#
# [,1] [,2]
#[1,] 1 2
#
#, , 2
#
# [,1] [,2]
#[1,] 3 4
#
#, , 3
#
# [,1] [,2]
#[1,] 5 6
dim(x)
#[1] 1 2 3
y <- aperm(x, c(2,1,3))
dim(y)
#[1] 2 1 3
y
#, , 1
#
# [,1]
#[1,] 1
#[2,] 2
#
#, , 2
#
# [,1]
#[1,] 3
#[2,] 4
#
#, , 3
#
# [,1]
#[1,] 5
#[2,] 6