Added support for generators in collections.
Added usage of generator in iterator behavior for Array in collections.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>