How do I delete a specific part of an int[] array?,,How do you delete a specific part of this int[] array

I have tried to do this:

int[] SoundNumber = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    void Start()
        {
            ChooseNumber.RemoveAt(4);
        }

I would really appreciate some help.
,I have tried this:

int[] SoundNumber = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    void Start()
        {
            ChooseNumber.RemoveAt(4);
        }

You can’t directly delete an element from an array. The length is given when you first create the array and it allocates that much memory from the ram. You can create a new array with 1 less element and copy other elements to it. I’m not sure if there is a reason you absolutely need to use an array, but if not, you can use List’s which can be better with these kinds of things. You can add elements, change elements, and delete them just as you want.

// Create an empty list
List<int> SoundNumber = new List<int>();
        
//... Or create with some values in it. 
List<int> SoundNumberWithValues = new List<int>{0, 1, 2, 3};
        
// Then you can add or remove elements easily.
SoundNumber.Add(2); // This will add "2" at the end of the list
SoundNumber.Remove(2) // This will remove "2" from your list. NOT the element at index 2
SoundNumber.RemoveAt(0) // This will remove the element with index 0

First, do not use directly array, but use complexe structure like List or LinkedList.

Second, what are you expecting to do when you call ChooseNumber.RemoveAt(4) whenever your array is SoundNumber ?

Third, you cannot directly remove an element of an array, you need to reallocate the whole array without the element. In other words, you would require to reallocate an array size - 1 elements and copy each element, one by one, except the one that you want to remove.

Don’t try to delete it.
If you wish to change the length of the array by ,deleting it", make a new array with the length for 1 unit shorter and copy and paste all ints from one to another. For example:

int[] firstArray;
int[] secondArray;
int x; // given placement
int i;
i = 0;
public void ChangeArrays()
{
while( i<x)
{
    secondArray _= firstArray*;*_

i++;
}
while( i < firstArray.length)
{
secondArray = firstArray[i -1];
i++;
}
}