This function is used internally in the wildobs_dp_download() function to take a set of schema fields and reformats them to ensure proper structure for use in a Frictionless Data Package.
It processes constraints dynamically (including pattern), removing NULL and NA values, and retains relevant metadata such as descriptions, units, formats, and the WildObs custom block (each covariate's source citation and spatial resolution).
See also
wildobs_dp_download for downloading and bundling data packages.
clean_list_recursive for removing empty list elements.