[RDY] Declare garray iterators in the for() scope where possible

This should make it easier to reason about garray usage across the codebase.