private static <T> T[] createArray(Integer length, Function<Integer, T[]> arrayFactory)
    {
        T[] newArray = arrayFactory.apply(length);
        System.out.println("New Array created" +
                           "\nType: " + newArray.getClass().getComponentType() +
                           "\nLength: " + newArray.length);
        return newArray;
    }