Normalize required array fields in OCF data. This ensures array fields that are null/undefined become empty arrays.
Uses lazy cloning - only creates a copy when modification is actually needed, and clones once then mutates the clone for efficiency.
The OCF entity type
The OCF data that may have null/undefined array fields
The normalized data with array fields as arrays
Normalize required array fields in OCF data. This ensures array fields that are null/undefined become empty arrays.
Uses lazy cloning - only creates a copy when modification is actually needed, and clones once then mutates the clone for efficiency.