NxN rotation:
using 1d array as approx of 2d array and passing it in as ptr
(now works for 2x2 and 3x3, todo NxN)