Having trouble understanding why the information is not being passed correctly in p5js

I’ll start of by posting the link to the code:
https://editor.p5js.org/bsilva.aulas/sketches/T0NVv6ya4

So this was something my teacher did in one of our classes, but didn’t finish, and hasn’t gone back to it, and I’m sitting here trying to figure out why the correct information isn’t passed to the CreatePanels function at line 107. The objective is to create multiple panels with 3 different arrays, but instead it creates 3 with the same array.

If anyone could help with this it would be gladly appreciated

Hi! Welcome to the forum!

First of all could you change the topic category to p5.js because Processing is for the Java environment?

The objective is to create multiple panels with 3 different arrays, but instead it creates 3 with the same array.

I couldn’t quite get what you mean… what does the code do, and what is the expected result?