You can easily set the dash pattern for the stroke of a shape.
Pattern Arrays
To set the pattern, specify an array of at least 1 value. The pattern repeats itself so even-count arrays will be symmetric, where odd-count arrays will alternate the occurrence of strokes and dashes.
Stroke-Gap
The order of the strokes and gaps looks like this: