Fix array cast type inference wrt packed arrays Use KEY_LONG instead of PACKED if it's possible for the array to be empty. It won't be packed in that case. Fixes oss-fuzz #39650.