Marshal handles both single values and arrays.
For arrays of maps/objects, it outputs multi-document YAML (with --- separators).
For simple arrays or single values, it uses standard YAML marshaling.
Unmarshal handles both single and multi-document YAML.
For multi-document YAML (separated by ---), it returns an array of documents.
For single-document YAML, it returns the document as-is.