Painting shapes and patterns on the mesh
Create object(s) close to the surface of the painted object (UV unwrapped object with a texture).
Add various materials on different parts of the shape object.



Add Subdivision Surface modifier with 2 or more subdivisions.
Make creases where it is necessary to preserve sharp edges of the shapes.
Add Shrinkwrap modifier with Target set to painted object and set mode to Projection.



Select shape object(s) and the painted object as last one, then open Render tab and in Bake settings select Textures as bake mode, enable Selected to Active and adjust Distance to prevent baking to the opposite side of the mesh. Then hit Bake button.



Final result: