Why are those arrays local to the loop() in the first place? You initialize them to the SAME values EVERY time loop() is called. That's pretty wasteful of processor cycles!!!
You can make them global and initialize them in setup() or make them static local and use a flag so that they're only initialized once. With either technique, the compiler would have flagged your error in allocating too much memory.