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.

Useful bit of added functionality, but probably won't go into core unless there's an actual use case. So, I'm still looking for one.