[Coop] Some conversion of custom-attrs.c. (#9309)
* [Coop] Some conversion of custom-attrs.c. (#9309)
* Add comment explaining mono_array_addr_with_size_fast vs. mono_array_addr_with_size.
* Have mono_array_addr_with_size reuse mono_array_addr_with_size_fast.
* split create_custom_attr_data into self and create_custom_attr_data_into_array, to avoid handle creation in loop (like alloca in loop)
Note there is a subtle semantic change here, in that previously
when invoke failed, we'd still store into the array.
The caller checks the error and throws out the data so it should be ok,
the same in the end.