If it were me I’d make a dashed path with the correct stroke and end cap styles to make the individual dashes into the shape you want. Then you can convert dashes to miniature paths of their own, convert stroke to path, and you’re off.
Further reading: