Generating SubArrays iterative approach n2 solution

Can anyone suggest O(n2) iterative approach for generating all subarrays.