Merry and Pippin are first cousins and Frodo and Merry are first cousins once removed. Sam’s daughter Goldilocks (Goldilocks??) married Pippin’s son Faramir, all per the LotR appendixes.
It was often said (in other families) that long ago one of the Took ancestors must have taken a fairy wife.
Fairy, of course, being the terminology Tolkien used for elves before deciding it was too twee for his horrible murdercreatures.
So who was this elf? I would postulate that she was (is?) most likely one of the Silvan and Sindarin elves that migrated from Lindon to the Greenwood over the Misty Mountains, a migration which would have led them through or near the area that would become the shire, lead by Oropher, Legolas’ grandfather.
Oropher was also, as a Sindarin prince in Thingol’s court, related to Celeborn, who is, of course, Arwen’s grandfather, thus relating them to Aragorn.
Galadriel, Arwen’s grandmother, was, plainly, shtupping Gandalf (just google it), and was ALSO sister to Angrod who is grandfather to Finduilas, who is mother to Boromir. ‘But Lion!’ you cry. ‘That was a different Finduilas!’ Was it? Did anyone that knew her find the body? Isn’t it said there’s elven blood in the line of Dol Amroth? Who but Finduilas has a taste in broody humans with a penchant for questionable tactical decisions? She married Denethor and had Boromir and Faramir (my gratitude to renowned elfscholar @emilyenrose for pointing out the obvious).
Back to Legolas! He is, obviously, married to Gimli, I don’t think anyone can dispute that. But, to tie things even more closely together, Gimli is Thorin’s third cousin once removed and Thorin, of course, was married to Frodo’s uncle Bilbo.