smalloc: WIP allow different external array types

Users can specify what type of external array they want using
smalloc.TYPES.

Mostly works, but needs more tests and documentation.