Berbers are descendants of Hamito-Cushitic populations from the Horn of Africa that diverged from us around 11-12,000 years ago. They possess some of the highest frequencies of the E1b1b Y-haplotype (i.e., genetic material inherited from father-to-son) outside of Somalis. The Bereber languages are Afro-Asiastic as Somali is, but they form their own cluster whereas Somali is a Hamitic/Cushitic language.
One of the oldest Somali cities is Berbera in Somaliland which locals say is where the Berbers derive their name from. Arabs in the pre-Islamic era referred to the Somali peninsula as Bilad al-Berber (Land of the Berbers), akin to how Ancient Egyptians referred to Punt by the name Ta netjer (Land of the Gods or by some translations, Land of Our Fathers). Combine this with older European theories on the paternal Hamitic origins of the Tutsi Kingdoms of Central Africa which are corroborated by some anecdotal stories in southern Somali regions and also now by genetic testing (Tutsi have higher frequencies of E1b1b than the ****), and you have a scenario in which several peoples originated from proto-Somali populations who then migrated out of the Somali peninsula and went on to found different civilizations.
Arabs on the other hand have virtually no significant genetic male contribution to most purely Somali populations; interestingly however, some southern Arabian populations in Yemen, Oman, and Saudi Arabia appear to have some paternal Somali influence. There is a slight signal for some maternal Arab influence in Somalis, but this occurred in the neighbourhood of 7000 years ago, if not earlier.