Syncing an array of INetworkSerializable objects with a NetworkVariable

Using Netcode for GameObjects, I want to create a NetworkVariable to sync an array of objects that implement INetworkSerializable.

What I want:

private NetworkVariable<MyNetworkSerializableDataClass[]> _data = new();

Reading through the documentation, the gist I got was that you need to create your own INetworkSerializable container class.

My solution was to create a generic class that can serialize an array of data.

public class NetworkSerializableArray<T> : INetworkSerializable where T : INetworkSerializable, new()
{
    public T[] values = Array.Empty<T>();

    public NetworkSerializableArray(T[] values)
    {
        this.values = values;
    }

    public NetworkSerializableArray()
    {
    }

    public void NetworkSerialize<TSerializer>(BufferSerializer<TSerializer> serializer) where TSerializer : IReaderWriter
    {
        if (serializer.IsWriter)
        {
            serializer.GetFastBufferWriter().WriteNetworkSerializable(values.ToArray());
        }
        else
        {
            serializer.GetFastBufferReader().ReadNetworkSerializable(out values);
        }
    }
}

Which makes my network variable declaration now look like this:

private NetworkVariable<NetworkSerializableArray<MyNetworkSerializableDataClass>> _data = new();

This seems to work fine.

My question:

Is there already a generic solution to serialize an array of custom objects? I’m trying to make sure I’m not reinventing the wheel.