Create a character style with underline. Apply it to a tab character or to several fixed width spaces. (Don't use normal space for that purpose). You can automate it with GREP.

Draw a line, copy it into you clipboard, change to your text curser, click on the position in text, with the direct selection tool you can adjust the length. With Object > Anchored Object Options you can adjust them vertically, you can use also a Character Style to adjust it, an object style is recommended to make late global adjustments to stroke width and color.