title: Generic way to duplicate slices
body: <p>I have a need to duplicate slices (and part of the underlying array) so a caller won't mutate the original elements of an array.  I think I can write a function to do this for arrays of specific types:</p>
  <pre><code>func duplicateSliceOfSomeType(sliceOfSomeType []SomeType) []SomeType {
      dulicate := make([]SomeType, len(sliceOfSomeType))
      copy(duplicate, sliceOfSomeType)
      return duplicate
  }
  </code></pre>
  <p>But is there a way to create the same method generically, perhaps without generics?</p>
  <pre><code>func duplicateSlice(slice []?) []?{
      duplicate := make([]?, len(slice))
      copy(duplicate, slice)
      return duplicate
  }
  </code></pre>