public static @NonNull int[] appendInt(@Nullable int[] cur, int val) {
    return appendInt(cur, val, false);
  }
Adds value to given array if not already present, providing set-like behavior.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/ArrayUtils.java