Yes, the spawn nodes on the map have rank values. As I understand it, a given rank alien can spawn on their own rank or lower. So if you make three commander spawn points and the map spawns one commander, it'll put it randomly on any of the three commander nodes. The commander can spawn on a navigator node if it needs to, but it'll prefer a commander node if one is available. The remaining two commander nodes will go unused. Let's say you have 2 medic nodes, 3 navigator nodes, and plenty of soldier nodes on your map. You change the craft data to spawn five medics: two go into medic nodes, three go into the navigator nodes, and all navigators are forced into soldier nodes. So when you walk into the cockpit, you find a bunch of physicians in there trying to fly the ship to the alien hospital. Probably why the thing crashed, amiright?
The deployment ruleset determines the number of aliens that spawn, i.e. 2-5 d3: the 2-5 sets the base range. Easy difficulties (Beginner and Experienced) spawn the minimum, 2. Hard difficulty (Superhuman) spawns the maximum, 5. Medium difficulties (Veteran and Genius) spawn the amount that's halfway in between them. In this case it is 3.5, so it rounds down to 3. The d3 means that after the initial number is chosen, it rolls 0 to 3 more. So Easy spawns 2-5, Medium spawns 3-6, and Hard spawns 5-8.
The rest of the deployment ruleset data determines the equipment sets that each rank will have at each tech level. By default there are three sets, corresponding to tech levels 0, 1, and 2. When the map spawns, the game goes to the alienItemLevels section of the ruleset and determines how advanced it is in the game, and scrolls down that many lines. The line chosen dictates the likelihood of each tech level spawning. So for example let's say our item level line reads [0, 0, 0, 0, 0, 0, 0, 1, 1, 2]. The game is spawning in a soldier, so it randomly selects a number from the line. We have a 70% chance of getting a 0, 20% chance we get 1, and 10% chance we get 2. Let's say the soldier's possible equipment sets are: 0) plasma pistol, 1) plasma rifle, 2) heavy plasma. We roll a 0 and this soldier is given that first equipment set, plasma pistol. So if the UFO has around ten or more soldiers, there's a good chance we'll see at least one heavy plasma on one. But other ranks may be different. An engineer might have equipment sets 0) plasma rifle, 1) heavy plasma, 2) heavy plasma, and then any engineers we see have a 70% chance of having a plasma rifle, 30% chance of having heavy plasma, and will never have a plasma pistol. So you can affect the weapon layout either by making it different between ranks, or by setting up your alienItemLevels.