Fix further compile time errors

- implement Foreach for 2D and 1D data structures
- add ::dim to SphericZone
- add in Plugin Controller to test compile