2D array works. 3D doesn't.

An array of 25655 = 6400 bytes, it's big, it's 78% of the Arduino Mega's memory. What Arduino do you use, and don't you have a red warning about memory usage, when you compile?

And because your values are only 0 or 1's, you can greatly reduce the space used by that array, for example each of your 5x5 "character" can be held inside 5 bytes, and you can still reduce that if you add some complexity.

Edit: also, since this array is full of constants, you could put it inside progmem.