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.
WIP: review fixes TO BE SQUASHED
WIP: few more small changes