Set a large chunk of a byte array at once.

I have an entire alphabet defined for a byte array.
ex.

 #define A { \
    {0, 0, 0, 1, 1, 0, 0, 0},  \
    {0, 0, 1, 0, 0, 1, 0, 0}, \
    {0, 0, 1, 0, 0, 1, 0, 0}, \
    {0, 1, 1, 1, 1, 1, 1, 0}, \
    {0, 1, 1, 0, 0, 1, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0}, \
    {0, 1, 0, 0, 0, 0, 1, 0} \
}

I'm using the code from this link Arduino Playground - DirectDriveLEDMatrix
But, I'm altering it so that I can have it's entirety as one large method that simply scrolls through the letters once. My goal is to simply have a string for the argument of the method. The original version of the program has the user manually enter the letters (referring to the predefined bits above) into the byte array that stores all the letters to be displayed. Here's what it looks like:

   const int numPatterns = 13;
 byte patterns[numPatterns][8][8] = { H,E,L,L,O,SPACE,W,O,R,L,D, SPACE, SPACE};

So basically, my goal is to put a string into this byte array. I couldn't figure out a proper way of doing this efficiently, so what I'm considering doing at this point is simply having a 26 case switch-case run for each letter of the inputted String, and then mapping that to one of the defined letters. This is my attempt so far:

 for(int a=0;a<words.length();a++)
  {
    switch(words.charAt(0))
    {
      case 'A':
        patterns[a] = A;
    }
  }

I think that I should be including the second and third dimensions for the array in the switch case, but "A" fills these, so I don't understand what address I would put in there. So how can I place this into the Array? Thanks for any help. If there's a better way of doing this, I would really appreciate the help.

You can't assign to arrays.

You could try something like this:

memcpy( &patterns[ 0 ], ( byte[8][8] )A, 64 );

However you use 832 bytes for the array, the above code will use 64 bytes each letter. Create your letters as progmem data then copy in using a similar code.

This stores the data in flash and only uses ram for the pattern array:

char letters[][8][8] PROGMEM = {
  { 
      {0, 0, 0, 1, 1, 0, 0, 0},  
      {0, 0, 1, 0, 0, 1, 0, 0}, 
      {0, 0, 1, 0, 0, 1, 0, 0}, 
      {0, 1, 1, 1, 1, 1, 1, 0}, 
      {0, 1, 1, 0, 0, 1, 1, 0}, 
      {0, 1, 0, 0, 0, 0, 1, 0}, 
      {0, 1, 0, 0, 0, 0, 1, 0}, 
      {0, 1, 0, 0, 0, 0, 1, 0} 
  },
  { 
      {0, 0, 0, 1, 1, 0, 0, 0},  
      {0, 0, 1, 0, 0, 1, 0, 0}, 
      {0, 0, 1, 0, 0, 1, 0, 0}, 
      {0, 1, 1, 1, 1, 1, 1, 0}, 
      {0, 1, 1, 0, 0, 1, 1, 0}, 
      {0, 1, 0, 0, 0, 0, 1, 0}, 
      {0, 1, 0, 0, 0, 0, 1, 0}, 
      {0, 1, 1, 1, 1, 1, 1, 0} 
  },
};


byte patterns[ 4 ][ 8 ][ 8 ];

void setup() {

  memcpy_P( &patterns[ 0 ], &letters[ 0 ], 64 );
  memcpy_P( &patterns[ 1 ], &letters[ 1 ], 64 );
 
}