Stable and metastable states in mean-field Potts and structural glasses | Synapse