I think TOS started with non-coms wearing those dreadful coveralls. Or perhaps they were low-ranked enlisted folk. I don't remember any Petty Officers, and I don't know if Chief Petty Officer was a rank in TOS. By TNG it got a little confusing, with Chief
O'Brien being either a a Chief Petty Officer or a Chief Warrant Officer, and it got weirder still by DS9 with the ranking pips. I remember O'Brien [in the TNG episode where we meet Worf's human parents] making the time-tested joke, "Don't call me sir,
for a living," so assume he was a CPO.
In TOS ensigns did not have rank insignia, their sleeves were "blank." As was Yeoman Janice Rand's. As was Nurse Chapel's [she had that cute little badge with the red cross on it]. I don't know if these women were considered ensigns or not. All the insignia were "one and a half stripes below" what they are in today's sea services. As a captain Kirk should have had four wavy stripes, Spock, three, and so on. The pips in TNG set that aright.
As for Troi, she wore the civilian garb, I guess, to make her "more approachable to prospective patients," or perhaps IRL was displaying BOOBIES for the audience. I was glad to see her assume the same uniform as everyone else. One thing Jellico got right anyways!
Former enlisted Coastie