Phaser.Utils.transposeArray will transpose the given array and return it.
Phaser.Utils.rotateArray will rotate the given array by 90 or 180 degrees in either direction and return it.