For methods/classes/etc.
In mono_custom_attrs_from_index_checked we need to do a proper iteration that uses a metadata-update aware bounds check, at least. (see the FIXME).
Note that normally the CustomAttribtues table is assumed sorted by the Parent column and assumed contiguous for a given parent. So if we add new attributes for an existing parent or new parents that are out of order with respect to the existing table, we will need some lookaside table on a slow path.
The correlated CoreCLR issue is #53066 (and in particular the comments with some tables that show what can go wrong)
Contributes to #57365