Get a ref not a copy

I believe you create a separate temporary holding array for your new data and then clear out your main array and set the new values from the temporary array into it. It seems somewhat convoluted but that’s why I’m leaving a comment and not an answer to see if others have a better solution.