رَأَيْتُ غُلَامَيْ زَيْدٍ
Translation: I saw Zayd’s two servants. Ghulāmay is the accusative dual object, marked by yāʾ, and mudāf; its nūn is omitted.
مَرَرْتُ بِمُسْلِمِي الْمَدِينَةِ
Translation: I passed by the Muslims of the city. Muslimī is genitive by yāʾ and mudāf; its nūn is omitted.
The dual/plural nūn drops in all three cases when the word is a mudāf; the ordinary case-marking alif, wāw, or yāʾ stays as required.