Restricting length of an array

As we have in other languages like C, Java
that once we define the length of an array we cannot assign any value to the array beyond it’s length.

i.e.
var ii=new Array(3);
ii[4]=“asdasdf”;

This kind of stuff is not possible in C and Java.
However AS2.0 calmly accepts the value and increments the length of ii (array) from 3 to 5.

Is there any means to restrict the array to accept only particular number of data.