There is no relationship. Brains are brains and hair is hair; the genes that code for hair do not code for intelligence. What you need to grasp is that correlation is not causation.
Everyone is related to the Africans, including you and me.No, the Negritos of the Andaman Islands are related to the Africans, obviously not to the neighboring Burmese.
The 200 islands of the Andaman archipelago lie in an arc between Burma and Indonesia in the Bay of Bengal. Their inhabitants possess an extremely distinctive phenotype, typified by a small average height, gracile build, dark pigmentation, and unusual hair morphology. Victorian anthropologists noted phenotypic similarities to the pygmoid peoples of Africa and suggested a recent African origin (e.g., Dobson 1875). However, to differing extents, these physical characteristics are present in populations scattered throughout Asia and Near Oceania. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC378623/
But you are forgetting that what you think of as 'races' is not just a description of genetics, but also appearance, intelligence, religion, culture, 'spirit', culture, language, geographical location etc, etc.. It is no good just pointing out that you can group people according to any one of these things; of course you can, you would have to show that all the other things also coincide. But they don't! Group people by genetics and you find they have different coloured skins, group them by skin colour and they have divergent geographical locations, pick a particular geographical location and you find a variation in language...
The reason we have so many different indicators for 'race' is in order that we can make 'races' fit the preconceived ideas of the racist. If one criteria doesn't give them the 'races' they want, they use another. For example, Jews have been identified as anything from fellow white Europeans to sub-humans, depending on the prejudice of the individual racist. So how the racist chooses to group human beings into 'races' tells us nothing useful about human beings...but tells us plenty about the racist.