[configuration] extract a YAML-friendly build_config_struct function from generate_config (closes #204933) [in-progress]