Accessing multi-dimensional arrays with variable name

Hello,
I am self-taught, so please forgive me if this is a dumb question…
After seaching the forum and StackOverflow I couldn’t find a answer (maybe because I didn’t use the proper terminology):

I have multiple 2-D-arrays and want to grab data from them depending on what I input.
I’ve extracted the important code-parts and made them generic:

String arraylist[3] = {"array_a", "array_b", "array_c"};

int array_a[2][4] = {{255, 240, 270, 310},{390, 210, 210, 240}}; 
int array_b[2][1] = {{280},{1080}}; 
int array_c[2][3] = {{255, 300, 280},{360, 1200, 180}}; 

int data1;
String activearray = "";
String text = ""; //This is changed by input in the full code

void selectarray(){
for (int pi = 0, pi < sizeof(arraylist)/sizeof(arraylist[0], pi++)){
        if (text == arraylist[pi]){
          activearray = arraylist[pi];
          Serial.println("Array "+activearray+" selected");
          
          data1 = activearray[0][1]; //This is where the Problem is
}
}
}

Is there an easy way to make the arduino handle the string I give him as an name of an array? Inspired by easy solutions to similar problems with String and int I tried things like

          data1 = int[][](activearray)[0][1]; 
          data1 = array(activearray)[0][1];

but (i guess for more skilled this is obvious) these did not work.

Maybe a different approach with an array-enum would be better instead of my String-array and then access the arrays through the enum (but then how to Serial.print them?)?

Help is greatly appreciated
Thanks for your time

The way that you are attempting to accomplish this is not allowed in C/C++. By the time that your code is downloaded to the Arduino, the names of variables are long gone.

Having an array with THREE dimensions may be the way to go, but there are other ways.

you can always assign a pointer to some array location

    int *pData = & array_a [1][0];

but it's unclear how you keep track of the size of the array or its dimensions. Other possibilities exist but need more information about what you're trying to do.

int array_a[2][4] = {{255, 240, 270, 310},{390, 210, 210, 240}};
int array_b[2][1] = {{280},{1080}};
int array_c[2][3] = {{255, 300, 280},{360, 1200, 180}};


typedef struct {
    int        *p;
    int         size;
    const char *label;
} Thing_t;

Thing_t  things [] = {
    { & array_a [0][0], sizeof(array_a), "array_a" },
    { & array_b [0][0], sizeof(array_b), "array_b" },
    { & array_c [0][0], sizeof(array_c), "array_c" },
};