smalloc: allow different external array types

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