@Validate
public static <T> T[] remove(@NotNull final T[] array, T element)
{
val list = new ReifiedArrayList<T>(array);
list.remove(element);
return list.toArray();
}
/**
* Removes all occurences of element from the given array, returning an new array if found. Otherwise returns a copy of the array
* containing all original items.