nbt: fix cloning of arrays