Remove usage of array_iter/iterdata

Would like to remove the array_iter<> objects and the iterdata they rely on. While an iterator abstraction similar to this would be good, I think for now it would be better to remove it and reduce the number of dynamic dimension abstractions in the library.

This converts a number of places that were using array_iter to use alternative constructs.