Personal names are pretty much the same as place names. As you point out, locations, occupations, and personal attributes can all work to form names.

If you look at http://www.behindthename.com/ for inspiration, you'll see that many of the most popular names (in English-speaking countries, at least) are borrowed from other languages (e.g. "God is my judge" in Hebrew ending up as "Daniel" in English). Slap a diminutive on a noun and you might end up with a name (e.g. take the diminutive form of the word for the traditional Roman hob-nailed military boot and you might see "Caligula"). Call someone "Red" and let the vowel shift slightly and you find yourself at "Reid".

Anyhow, I'm not sure what you mean by the "function" part.

In some cultures, you can trace lineage through family names. For human cultures, if the family name passes through the female line, surnames will multiply over time; if the family name passes through the male line, surnames will tend to consolidate over time (more females survive to reproduction than males). In other cultures,