IteratorsMD: avoid ambiguity warnings by using more stagedfunctions

This also implements a way of handling 0-dimensional arrays that
doesn't require adding a field to a CartesianIndex_0.