رِجَالٌ: broken plural, normally fully declinable; genitive رِجَالٍ.
كُتُبٌ: broken plural, normally fully declinable; genitive كُتُبٍ.
مَسَاجِدُ: on the book's specified pattern; bare indefinite genitive مَسَاجِدَ.
Being a plural and belonging to ṣīghat muntahā al-jumūʿ are not the same thing.