Support crate `array` and `object` data types

May also add the actual detected type in the exception message.