Why does "for" not work

You don't need to do a pinMode for the analog in pins.

By using the analogRead() command that is enough for it to know that you want to use the analog pins.