array iteration helper
prefetching boilerplate