This fix is quick-and-dirty since it only reduces the amount of stackspace allocated by changing the data type of the array to uint8_t instead of the 32 bit integers. The reduced number of bits is OK since only (at most) 2 of the available bits are used in each element.
At least array bit utilization is improved from 6.66% to 25% :)
Large structures such as these should probably be malloc()ed.