Ensemble arrays now working with delayed build.

- Also added examples and unit tests for it