Declaring variables using FOR loop arduino

Hello,
I have 9 servos placed in 3 rows and 3 cols. I was trying to find a fast way to declare them all.

I want to declare multiple variables:
servo11,servo21,servo31
servo12,servo22,servo32
servo13,servo23,servo33

Here’s my code. Don’t mind my mixing languages skills;)

#include <Servo.h> //Biblioteka odpowiedzialna za serwa

//Tworzymy obiekt, dzięki któremu możemy odwołać się do serwa 
int pozycja = 0; //Aktualna pozycja serwa 0-180
int zmiana = 30; //Co ile ma się zmieniać pozycja serwa?

void setup() 
{ 
} 
 
void loop() 
{  

int myArrayOne[3]; // 3 elements
int myArrayTwo[3]; // 3 elements

int x,y,z;

for(x=0; x<=2; x++){
    myArrayOne[x]=x;
    for(y=0; y<=2; y++){
        myArrayTwo[y]=y;
        Servo servo[x][y];
        for(z=0;z<=10;z++){
            servo[x][y].attach(z);
            servo[x][y].write(0);
        }
    }
}

  if (pozycja < 61) { //Jeśli pozycja mieści się w zakresie
    servo[x][y].write(pozycja); //move _-_-_THERE IS a mistake_-_-_
    servo12.write(pozycja); // this was originaly made. 
    servo13.write(pozycja);
    servo21.write(pozycja);
    servo22.write(pozycja);
    servo23.write(pozycja);
    servo31.write(pozycja);
    servo32.write(pozycja);
    servo33.write(pozycja);
  } else { //Jeśli nie, to powrót na początek
    pozycja = -1;
  }    
  
  pozycja = pozycja + zmiana; //Zwiększenie aktualnej pozycji serwa
  delay(200); //Opóźnienie dla lepszego efektu                        
}

I’ve created 2 arrays. “One” to operate in cols, “Two” in rows. And variable “z” is needed to locate pin on my board.
For now when i try to compile sketch it says that “servo was not declared” in line that I’ve marked in code. I know why, but i can’t find any solution.
Servo11, Servo12 and so on, will be declared later in the for’s functions, so compilator doesn’t see them.

Can someone help me compile this sketch?
Sorry for my bad english. Thanks

int x, y;

Exactly, this is an XY-problem, and the question is meaningless without more context.

Pieter

I want a faster way to declare all this variables. I want to use loops to make it faster and optimal.

Not declaring manualy, like:

Servo servo11;
Servo servo12;
Servo servo13;
...
Is it possible?

It appears that you are trying to create several instances of the Servo class with 2 digit numbers on the end of the names. That is NOT going to happen with a for loop (or pair of them). You could create an array of Servo objects.

Is it possible?

No.

What you want is an array. You can't put numbers in variable names like that, but an array does exactly what you want. Google "C++ array" for more info.