I have seen many tutorials on how to make dotted lines on the forum. The ideas are very good, but I always feel that they are more or less unsatisfactory. The main reason is that the transitions in the curves are stiff. In fact, there is a powerful tool for constructing dotted lines in PS, which is the "double brush".