Question about Arrays & for

I recommend you read this post and then give us enough information to help you.

Resizing an Array is not something you typically do in GDScript. So the fact that you are doing it raises red flags. If you’re trying to make a game, tell us what you’re actually trying to accomplish with this solution.

If you want to know how the internals of how the engine works, take a look at the source code:

And if you feel there is a bug, log it here: Issues · godotengine/godot · GitHub