Toothpicks or sewing needles work best for dots and really small designs, and my special little trick for when I want straight lines is to use scotch tape.
You basically just put the tape on top of your nails and paint over it, and voila! A straight line!
You can also cut the tape into curves to make different designs.
That's how I make perfect French tips
(for French tips, I basically just cut the curve of the tape to match the natural curve of my fingernail by putting the tape over my fingernails, overlapping the ends, cutting around the curve, then bring the tape back to just where the white of my nail starts. Then I paint over the tape, and since the tape blocks the rest of my nail, it paints a perfect French tip!)
Just make sure that if you're going to put the tape on top of pre-existing nail polish that the tape you use isn't TOO sticky, or when you peel the tape off, it will peel off your nail polish as well