Add test to test for array-based loop

See #45.