Because array indices are automatically adjusted the lower and upper limit of indices of an array are not constant. They may change. To get the lowest and the highest index of an array that has assigned value (possibly undef) you can use the function lbound and ubound. The names stand for lower bound index and upper bound index.
For example the simple program
As you can see the argument to these functions can be a variable that has array value or an expression that has an array value. (Such an expression is likely to be an array element, which is an array by itself.)
When the argument is not an array the functions returns undef.