How to copy part of an array

I have an array in a GameObject ‘Core’, I also have an array in GameObject ‘Player’, both arrays are class arrays 'Monsters'but when i use System.Array.Copy(Core.monsters, monsters, 151) the array is still referencing the array in Core. Here is the code inside Player.

public class PlayerMonsters : MonoBehaviour {
    public Monsters[] monsters = new Monsters[151];
    public Monsters[] team = new Monsters[6];
    public GameObject CoreObj;
    void Start()
        Core Core = CoreObj.GetComponent<Core>();
        System.Array.Copy(Core.monsters, monsters, 151);
        team[0] = monsters[5];

All i want to do is create a array of six monsters from Core.monsters without altering the values of Core.monsters.

If i am not wrong, it will copy the array but both arrays will still have references to the same set of monsters.

So by modifying a monster you will modify it in both arrays.

If you look at the MSDN documentation for Array.Copy method, it states that:

If sourceArray and destinationArray
are both reference-type arrays or are
both arrays of type Object, a shallow
copy is performed. A shallow copy of
an Array is a new Array containing
references to the same elements as the
original Array.

So as you are experiencing in your case it is performing a shallow copy.

If you want to create a deep copy of the elements then you can implement the IClonable Interface on your Core class so that monsters array can be deep copied. Although remember there are certain downsides to using the IClonable interface as discussed on the same page which states:

The ICloneable interface simply
requires that your implementation of
the Clone method return a copy of the
current object instance. It does not
specify whether the cloning operation
performs a deep copy, a shallow copy,
or something in between. Nor does it
require all property values of the
original instance to be copied to the
new instance. For example, the
NumberFormatInfo.Clone method performs
a shallow copy of all properties
except the NumberFormatInfo.IsReadOnly
property; it always sets this property
value to false in the cloned object.
Because callers of Clone cannot depend
on the method performing a predictable
cloning operation, we recommend that
ICloneable not be implemented in
public APIs.