util: move add_gid_to_array_unique to toplevel and add add_uid_to_array_unique.