from array to spiral matrix