Added the 'rotate' method for Arrays.