code: @SuppressWarnings("unchecked")
    public static <T> T[] mkTArray(Class<?> klass, int size) {
      return (T[])(Array.newInstance(klass, size));
  
    }
docs: Makes an array based on klass, but casts it to be of type T[]. This is a very
  unsafe operation and should be used carefully. Namely, you should ensure that
  klass is a subtype of T, or that klass is a supertype of T *and* that the array
  will not escape the generic constant *and* that klass is the same as the erasure
  of T.
  @param <T>