rotates an array clockwise 90 degrees