Make lazy array-version work

Also refactor functions so that they can be called the same
way via run-iterations.