you see to be missing basic concepts.
there are two data types, value and reference.
value types are immutable and copied on assignment:
int i1 = 0;
int i2 = i1; // i2 gets a copy of the i1 value
int i2 = 2; // i2 get a copy of 2, i1 still == 0
reference data types may or may not be immutable, but a variable has a reference to the data type:
public class Foo { public string Bar; }
var f1 = new Foo { Bar = "hello" };
var f2 = f1; // both f1 and f2 reference the same object
f1.Bar = "Bye"; // both f1.Bar and f2.Bar == "Bye"
now we get to methods. a method parameter variable may be passed by value (the default) or by reference. this is referring to the variable, not the data type.
static void PassByValue (int i) { i = 2; }
static void PassByRef (ref int i) { i = 2; }
int i1 = 1;
PassByValue(i1); // a copy of the variable is passed
Console.WriteLine(i1); // 1
PassByRef(ref i1); // a reference to the variable is passed
Console.WriteLine(i1); // 2
an array is a reference type. when you pass it to a method, the method can modifiy elements in the array, but array do not support resizing. to change the size of an array, you must allocate a new one. if you want a method to change the size of an array, you must pass the array variable by ref, so the variable can be updated.
static void GetBytes(ref byte[] bytes) { bytes = new byte[]{0,1}; }
byte[] bytes = new byte[]{};
GetBytes(ref bytes);
Console.WriteLine($"{bytes[0]},{bytes[1]}");
but a better approach is to have the method return a new array:
static byte[] GetBytes() => new byte[] { 0,1 };
byte[] byes = GetBytes();