You can break a function most anywhere you want, but you have to add a backslash before the newline.
The one exception is that whitespace before commas is preserved in some sorts of functions, so be careful when constructing filenames, etc. where adding embedded whitespace might cause issues.
Given your example above, it will work as:
$$(foreach name,$$(BUILDERS_$$(TARGET_TYPE)_ARGS),\
$$(if $$(filter undefined,$$(origin TARGET_$$(name))),\
$$(error [$$(TARGET_NAME)] is missing mandatory argument [$$(name)] for the builder [$$(TARGET_TYPE)])\
)\
)