Knowing that we shouldn't loop through arrays that can potentially be so big that the function iterating over them would run out of gas, would the following work?
If I had an array with a million or more records (addresses) and I wanted to extract a list of all its contents. Would I be able to do it by using a limit + offset?
The function would iterate over the big array from array[offset] to array[offset+limit] and return an array with those elements.
Would this work even if the original array I'm iterating over was huge? (as long as limit is a relatively small number).