Convert Byte array into collection of items of different types
case nameof(UInt16):
           return 2;

       case "Byte":
           return 1;



Be consistent. nameof is clearly preferable.




private void ConvertArray(byte[] response, ref object[] items)
{
    int index = 0;
    for (int i = 0; i &lt; items.Length; i++)
    {
        var item = items[i];
        var itemType = item.GetType();
        var itemSize = SizeOf(item.GetType());




The last line should use the variable itemType.
The sole point of items seems to be to extract types. So why is the parameter not params Type[] types?





        if (itemSize == 0)
        {
            continue;
        }



Would it be better to throw an exception?




        else if (itemSize == 1)
        {
            items[i] = response[index];
        }



That's a bug waiting to happen in the future when you add support for sbyte.




        {
            var method = typeof(BitConverter).GetMethod($"To{itemType.Name}");
            var returned = method.Invoke(null, new object[] { response, index });
            items[i] = Convert.ChangeType(returned, itemType);
        }



Ugh. I would much rather use T4 to generate the entire method and get rid of the reflection. That would probably also eliminate the need for Sizeof.



If you're using a recent .Net (e.g. .Net Core 2.1) then I think some combination of Span&lt;T&gt; and Memory&lt;T&gt; will do what you want. Over the past year or so, Microsoft has done a lot of work on C# features for byte-level memory manipulation. You can probably create a struct for the contents of the packet and coerce the byte[] into your struct with one or two lines of code.