They are recorded in many types of books:
Islamic History books, some well known Islamic History books are:
Sirah books: biography of the Propeht Muhammad (pbuh) and events in his life, some well known Sirah books are:
Sirat Ibn Hisham (Biography of the Prophet by Ibn Hisham) سيرة ابن هشام, By Ibn Hisham.
Sirat Ibn Katheer سيرة ابن كثير, by Ibn Katheer.
Books of Sahabah Figures أعلام الصحابة, which speak about the life of Sahabah, either many of them, or some books speak about the life of a specific one of them, may Allah be pleased with them All. Some Sahabah Figures books I could mention are:
Al-Isabah fi tamyiz al-Sahabah الإصابة في تمييز الصحابة(weak translation: Correctness in recognizing the Sahabah) By Ibn Hajar Al-Asqalani.
Usd al-ghābah fi ma‘rifat al-ṣaḥābah أسد الغابة في معرفة الصحابة (weak translation: The lions of the Forest - Knowing About the Sahabah) By Ibn Al-Athir.
Books of the Study of Narrators تراجم الرجال, which study narrators of Hadiths and how trusty are them, it regards their personal life, and so mention such stories. Some books I could mention are:
Tahdhib Al-Tahdhib تهذيب التهذيب by Ibn Hajar Al-Asqalani.
Taqrib al-Tahdhib تقريب التهذيب (considered a summary of the previous one) also by Ibn Hajar Al-Asqalani, in fact he has many books in the Study of Narrators.
Some of these books, especially books of Islamic History and Sirah, depend on the narration technique that Hadith depends on.
Please note the the example books I mentioned are not necessarily the best of their type (it's just they were recommended to me when I needed such books). Also there might be other types, but those are the ones I know, and I didn't hear about any other types.
Hope that's helpful.