lib/json_serialization: extract `serialize_to_pure_json` from `Array`