Text this: Generalized symmetries in F-theory and the topology of elliptic fibrations