code: public <T> T[] asArray(Class<T> clazz) {
        return Cast.as(convert(toConvert, Array.newInstance(clazz, 0).getClass()));
     }
docs: Converts an object into an array of objects
  
  @param <T>   the type parameter
  @param clazz The type of the object to create.
  @return An array of the object