@SuppressWarnings("unchecked")
    public static <K> K[] remove(K[] original, int removeIndex) {
        K[] returned = (K[]) new Object[original.length - 1];

        if (removeIndex >= original.length)
            removeIndex = original.length - 1;

        for (int i = 0; i < removeIndex; ++i)
            returned[i] = original[i];

        for (int i = removeIndex + 1; i < returned.length; ++i)
            returned[i - 1] = original[i];

        return returned;
    }