Take a not nested array in as input. Turn it into a matrix by:
Let's say my array is [1, 2, 3, 4, 5]
First, I repeat that array 5 times: (the length)
[[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5],
[1, 2, 3, 4, 5]]
Then, I read it along the diagonals:
[[1],
[2, 1],
[3, 2, 1],
[4, 3, 2, 1],
[5, 4, 3, 2, 1],
[5, 4, 3, 2],
[5, 4, 3],
[5, 4],
[5]]
I flatten this array and split it into pieces of five (the length):
[[1, 2, 1, 3, 2],
[1, 4, 3, 2, 1],
[5, 4, 3, 2, 1],
[5, 4, 3, 2, 5],
[4, 3, 5, 4, 5]]
This is code golf. Fewest bytes wins.