Added array/object caching to @for loops