This is a follow-up to the work recently merged in bd4f879. In hindsight, I regret not pushing these through for the previous cycle, as they represent the "missing pieces" for users trying to perform data cleaning entirely within the JSONPath engine. With these we can significantly reduce the need for users to "drop out" of JSONPath into standard SQL for basic string-to-string-or-array-and-back workflows.
Seems this one got overlooked, so I took a look. The first patch applies, but the second needs a rebase.