docs: static public Object[] remove(Object[] array, Object key, boolean reallocate)
      {
          if (array != null)
          {
              int length = array.length;
  
              for (int i = 0; i < length; i += 2)
              {
                  Object curKey = array[i];
  
                  if (((curKey != null) && curKey.equals(key)) || (curKey == key))
                  {
                      Object[] newArray = array;
  
                      if (reallocate)
                      {
                          newArray = new Object[length - 2];
                          System.arraycopy(array, 0, newArray, 0, i);
                      }
  
                      System.arraycopy(array, i + 2, newArray, i, length - i - 2);
  
                      if (!reallocate)
                      {
                          array[length - 1] = null;
                          array[length - 2] = null;
                      }
  
                      return newArray;
                  }
              }
          }
  
          return array;
      }