Fix logic to set default outputformat based on array dtype
Increase coverage of dataset.arrayobj