ENH: add multiple type support in from_array()