You will not get more complicated time complexity than this: It creates a new array and copies every sector into it.
static T[] sectorSort<T>(T[] elements, int sectorWidth, int sectorHeight, int columns, int rows) { T[] sortedElements = new T[elements.Length]; int n = 0; int arrWidth = sectorWidth * columns; for(int secY = 0; secY < rows; secY++) for (int secX = 0; secX < columns; secX++) { int baseIndex = secY * arrWidth * sectorHeight + secX * sectorWidth; for(int y = 0; y < sectorHeight; y++) for (int x = 0; x < sectorWidth; x++) { int sourceIndex = baseIndex + y * arrWidth + x; sortedElements[n++] = elements[sourceIndex]; } } return sortedElements; }
I still see a lot of optimizations that can be performed, but, reading your question, I see that this is done at boot time, so don't worry too much about it.
EDIT: fixed code
EDIT2: test setup (C #)
int[] array = new int[] { 11, 12, 13, 21, 22, 23, 51, 52, 53, 14, 15, 16, 24, 25, 26, 54, 55, 56, 17, 18, 19, 27, 28, 29, 57, 58, 59, 31, 32, 33, 41, 42, 43, 61, 62, 63, 34, 35, 36, 44, 45, 46, 64, 65, 66, 37, 38, 39, 47, 48, 49, 67, 68, 69, 71, 72, 73, 81, 82, 83, 91, 92, 93, 74, 75, 76, 84, 85, 86, 94, 95, 96, 77, 78, 79, 87, 88, 89, 97, 98, 99, }; int[] sorted = sectorSort(array, 3, 3, 3, 3); for (int y = 0; y < 9; y++) { for (int x = 0; x < 9; x++) Console.Write(sorted[x + y * 9] + " | "); Console.WriteLine("\n"); }