refactoring: making array and var primitives implemented in extern with a fixed api, which lets us remove a lot of the DeliteArray stuff from core