How use cascade delete for array field in PostgreSQL?
First of all you need to create gin index on array field:

CREATE INDEX index_university_user_id ON university USING gin (user_id);


Then you need to add trigger to process deleting users:

CREATE FUNCTION trg_d_users() RETURNS TRIGGER AS $f$
BEGIN
    UPDATE university
       SET user_id = array_remove(user_id, OLD.id)
     WHERE user_id = OLD.id;
    RETURN OLD; 
END
$f$ LANGUAGE plpgsql;

CREATE TRIGGER trg_d_users BEFORE DELETE ON users FOR EACH ROW EXECUTE PROCEDURE trg_d_users()


If you want to remove university without users, you can add into function after UPDATE:

DELETE FROM university WHERE user_id = '{}';


And also I would reccomend to rename user_id field to user_ids. It very useful to see that field is array without checking schema.