When serializing arrays of primary type I've found a code which fallbacks to Array.GetValue in ReflectionXmlSerializationWriter .WriteArrayItems method. Code:
var arr = o as IList;
if (arr != null)
{
for (int i = 0; i < arr.Count; i++)
{
object? ai = arr[i];
WriteElements(ai, null/*choiceName + "i"*/, elements, text, choice, true, true);
}
}
This results in a lot of allocations in simple serialization loop program.

This is not a real issue found in production code - just something that popups while trying to optimize the upper allocation :
