Completition of rotate 2d array clockwise

Key was rather than creating a temporary 2d array in the main function,
I created a temporary array separately everytime there was a need to
rotate the 2d array. In this way, I don’t have to reset pointer in the
main function.

Bugs that got in my way :
tried to define array2d = {(), (), ()} rather than {{}, {}, {}}. This
wasted my time significantly.