What I know is that, when there are more than two vowels , we put "-es" but in "Arzt" we put -"es", but what about "Zahnarzt" oder "Tierarzt"? We'll put "-es"? Or is there some other logic behind this ?
First recommendation: look into the dictionary, see this question. In many cases pronounciation already gives a hint: trying to pronounce "Arzts" without getting a knot in ones tongue gives an indication, why the e is useful here.
In composite substantives the composition has the same genitive ending.