Automatically convert objects to arrays as needed.