The key phrase I had been looking for to define the type of monarchy you mean is an Elective Monarchy. The description for this type of monarchy is:
An elective monarchy is a monarchy ruled by an elected monarch, in
contrast to a hereditary monarchy in which the office is automatically
passed down as a family inheritance. The manner of election, the
nature of candidate qualifications, and the electors vary from case to
case. Historically it is not uncommon for elective monarchies to
transform into hereditary ones over time, or for hereditary ones to
acquire at least occasional elective aspects.
In this Wikipedia Article you will find a lot of examples of historic monarchies. A nice detail to this is this piece of text:
Many, if not most, kingdoms were officially elective historically,
though the candidates were typically only from the family of the
deceased monarch. Eventually, however, most elected monarchies
introduced hereditary succession, guaranteeing that the title and
office stayed within the royal family and specifying, more or less
precisely, the order of succession.
Currently, the world's only true elective monarchies are:
- Malaysia
- Cambodia
- The Vatican
So, even though there is some discussion about the inclusion of the Papacy, it does seem to belong in the answer of this question.