ARM: Discovering Agentic Reasoning Modules for Generalizable Multi-Agent Systems