How do get the array length?

AWOL:

Arrays do change length, especially when you are adding additional things to an existing array

Assuming that were possible (note the use of the subjunctive), you'd know how much you'd added, so you'd still know how big the array was, because to change the length, you'd have had to reallocate the memory for the size of the old array plus the new allocation, so you'd've remembered all that, wouldn't you?

If you have a zero length array and you have a random number that then is used to seed an array with nth elements, you wouldn't know how long it was if data was being added to it or removed throughout the code execution...