code: public static boolean[] removeAllOccurrences(final boolean[] a, final boolean element) {
          if (N.isNullOrEmpty(a)) {
              return N.EMPTY_BOOLEAN_ARRAY;
          }
  
          final boolean[] copy = a.clone();
          int idx = 0;
  
          for (int i = 0, len = a.length; i < len; i++) {
              if (a[i] == element) {
                  continue;
              }
  
              copy[idx++] = a[i];
          }
  
          return idx == copy.length ? copy : N.copyOfRange(copy, 0, idx);
      }
docs: Removes all the occurrences of the specified element from the specified
  array. All subsequent elements are shifted to the left (subtracts one
  from their indices). If the array doesn't contains such an element, no
  elements are removed from the array.
  
  @param a
  @param element
  @return A new array containing the existing elements except the
  occurrences of the specified element.