Quantum entanglement in the Sachdev–Ye–Kitaev model and its generalizations