improvements for boxed math
added int-indx to generator macro for less coercions when accessing arrays