This whole part to pack led ON/OFF into the bits of bytesToShift according to 2 arrays of bytes;
for (int a = 0; a < 4; a++)
bytesToShift[a] = 255;
for (int matrixNumber = 0; matrixNumber < totalNumberOfMatrices; matrixNumber++)
for (int possibleLed = 0; possibleLed < 8; possibleLed++)
if (drawLeds[matrixNumber][possibleLed][row] == true)
bytesToShift[matrixNumber] -= (255 - bytesX[matrixNumber][possibleLed]);
I think you can cut that way down using & and | operations on bytes in the place where you set drawLeds[][] values. You won't need the drawLeds[][] array, just fill bytesToShift[] directly right there and dispense with the code shown above completely.
You might practice with byte-wide bit operations some in code first, printing results in HEX or BIN to make it easier to 'see the bits'. I use unsigned 8-bit (type byte) so the sign bit of type char doesn't get in the way.
byte B = 1 << 3; // B = 0b00001000 ... 0b is binary notation instead of decimal
B = B | 1; // B = 0b00001001
byte A = 0b01010000;
B = B | A; // B = 0b01011001; | (OR) sets bits, all bits from both get copied to the result
bitWrite( B, 3, 1 ); // B = 0b00001000 ... how to set single bits without using shift as above
// but with shift you can move multiple bits in one go.
A = 0b00001111; // you don't have to put in the leading 0's but they don't hurt
B = A & 0b11110101; // B = 0b00000101; & (AND) masks bits, only matching bits get copied
These are the same as what you do with
bytesToShift[matrixNumber] -= (255 - bytesX[matrixNumber][possibleLed]);
only much easier to 'see through' and can manipulate all the bits in one operation if you have bytes prepared.
It will take some time to know this enough to do what I wrote could be done above. Be sure to see how more than just one or two parts work, easier/shorter paths will be apparent even if you don't get 'perfect' right away.
Remember, you already have code that works. Mission accomplished! The rest can be regarded as either apple-polishing or good practice/training for later efforts. In most cases, time spent polishing now should pay off with much greater time saved later.