To look at that, you need to understand the purpose of ranks first. So let's look at the army:
The basic unit of the Army is the squad, which is roughly ten men. The leader of the squad is generally a Staff Sergeant. A Sergeant or Corporal, or senior Private/PFC, will be the Team Leader. The TL is the right hand man for the SL, and is his back up in case shit goes down. When the squad splits, the TL takes one half, the SL takes the other.
Squads are organized into platoons of forty. Platoons are put under the charge of a Sergeant First Class, acting as Platoon Sergeant. Platoons are organized into companies, which are under the charge of a Master Sergeant, acting as First Sergeant. SFC and MSG ranked individuals can be found in non-leadership roles as well doing things that require higher levels of clearance.
Battalion level and higher starts getting into have the Sergeant Majors involved.
Note that even a Corporal has been in the service for at least a few years. In contrast, an incoming 2LT (except for one who has been enlisted prior) is a complete novice. And yet despite this, his first assignment is being put in charge of a platoon as the Platoon Leader (or PL). He will work alongside his Platoon Sergeant. If he's smart, he'll learn from his PSG, and become a good leader in his own right. If he's not, he'll do some dumbass shit like trying to pull rank on a CSM whose best friend is the battalion commander.
Captains are put in charge of a company as the Company Commander. They work alongside the First Sergeant. Colonels are put in charge of battalions, with an executive officer who is a Lieutenant Colonel and a staff of Majors. The staff only occurs at battalions and larger, with staff jobs being things like security office, adjutant, chaplain, and so on. Generals and the senior Sergeant Majors handle everything above that. Things get more complicated one you hit the DOD as a whole, which composes every military branch, and civilian aspects.
Warrant Officers are enlisted individuals who are not commissioned officers. They are pretty much the most badass motherfuckers, because while they're not generalist officers, they are specialized as fuck in the area they were given the rank for. They are the rarest individuals to be spotted in the service because not many people become warrant officers, but when they're called in, it's because they're really fucking good at it. The Warrant Officer who specializes in piloting helicopters, for instance, is going to be able to safely land one with its fucking rotor shot off, and nobody will bat an eye.
Specialists are exactly what that implies. They specialize in something.
This is all incredibly general, but the thing it's meant to hammer in is this: Rank structure exists to create two separate areas, the command (officers) and the execution (enlisted), all present to ensure the proper facilitation of activities and a cohesive organization. So just keep that in mind when developing a rank structure.