How to do pixel array rotation whose angle not a multiple of 90 degree?
Choose an origin for your coordinate system. A corner or the middle of the image is typical.
For each pixel, compute its (x, y) coordinates relative to the origin.
For each pixel, compute its new coordinates when keeping its distance from the origin the same and adjusting its angle by the desired rotation. 
In a temporary buffer, copy pixels from the original image using the new coordinates.
Go over the temporary buffer, and for each pixel that wasn't assigned a color, interpolate the colors from surrounding pixels.


There are some details glossed over there, but the basic idea is sound. Coordinate transformations can be accomplished using basic trigonometry.