Getting an individual element counts as getting a part of an array in constant time (yeah, it’s trivial and most likely not what you want)
You can shrink an array by setting its length to a smaller value, but you don’t want to do it if you don’t want to lose data (or if you want to preserve your array).
I’m not sure if it’s possible to get a part of an array in constant time, since getting a part of an array implies copying data, and getting those data means iterating through some part of the original array.
But I’m not really sure though. Maybe the JS engine makes some optimizations. I can’t try it because I’d quickly run out of precious RAM if I tried making a billion-size array (and making a copy of it).