I noticed one could write code like this, which is perfectly normal, by the way:
int arrays[] = {1, 2, 3};
for (int n : arrays)
System.out.println(n);
To be honest, the only fallacy I see in your explanation is how can you tell a computer to go through an object/memory that does not exist?
You have to create something to let go through it first, here, you have created nothing and the logical fallacy exists in your head because you have thought more deep than the creation rules of Java itself.
Don't worry, I find myself in situations like you but the most important thing is to learn how Java was programmed first!