how to get an x of elements from an array

well i don’t know if this title is in line with my doubt, but i will explain the best.

I have 50 positions stored in a matrix in vector3.
how do I get only 20 positions from those stored positions?

my test is like this, but even trying to get only 20 or more positions in each case, it exceeds

    public Vector3[] posic;
    public int indexmenu,index1,index2;

    public void voidScrool()
    {
        if (indexMenu <= 0)
        {
            indexMenu = 0;
        }

        if (indexMenu >= 1)
        {
            indexMenu = 1;
        }

       
        switch (indexMenu)
        {
            case 0:
            {

                int posic = 26;
                ScroolObj.transform.localPosition = posic[index1];
                for (int i = 0; i < 26; i++)
                    pot[i].SetActive(true);
            }

            break;
            case 1:
            {
                int posic = 30;
                ScroolObj.transform.localPosition = posic[index2];
                for (int i = 0; i < 30; i++)
                    pot[i].SetActive(true);
            }

In lines 22 and 31 you define locally posic as int with assigned value.
In very next lines, you try to access this variable as an array, which isn’t array anymore, but local int.
What is the purpose of line 22 and 31? Currently they appears, they shouldn’t be there. Possibly it should pass value into for Loop.
I suggest, to comment them out at this stage.
Alternatively, change this int name. But then, it wont have any use anyway.

on lines 22 and 31 is one of the tests I was trying.
if I leave it as “posic = 26;” unit tells me to convert to int or something like that

what would be the right way to obtain these values?

discard lines 24 and 25, 33 and 34, this part is just an active button