2.8: How to texture paint some elements of mesh only?
You can make use of the Face Select Mask setting to limit the effect of your texture paint to selected faces in Texture paint mode.
First image is the basic setup in Texture Paint.

Second image is turning on the Face Select Mask and making a selection on the model.

Third image shows a result with two areas painted, one selection active.