How to replace elements in an array of type T? - C#