Create the dotted path by checking
Dashed on the Stroke Panel and entering a dash length equal to or smaller than the weight of the stroke. Also ensure you tick the
Round Caps and
Round Joints options.
Then duplicate the stroke in the Appearance Panel and choose
Effect > Path > Offset path and enter the amount of offset you want.
If your path is a closed path, you'll need to create another copy of the stroke in the Appearance Panel and apply a different offset amount to that second copy. Basically, for open paths you only need 1 duplicate. For closed paths you need 2 duplicates.
You can then drag this path to the Graphic Styles Panel and easily reapply it to any path by selecting a path and then clicking the style.
Photoshop simply doesn't have the options to do this as easily. You can draw a path and make it dotted in Photoshop, especially in the Creative Cloud versions via the vector stroke options. It's very similar to the Illustrator method above. However, for copies of the path you'd have to draw one path, then manually duplicate that path for any other paths you wanted. You coudl try a brush in Photoshop with a higher degree of
Spacing dynamics, but that's s