Add the assignments that should happen on each iteration

This completes the first pass of for loops, so basic functionality is
there. I've left TODOs where I've left errors unfixed, or where we can
improve functionality