Fixing type determination issue with certain operators.
Renaming memory management function.
More for arrays (including index op). Also some scaffolding and generation niceties.