Add support for zoned decimal data type

Also fix typo/bug with array index.