Basic/Expert D&D doesn't have anything to say about firing into melee. A lot of editions level rather punitive penalties against this (AD&D had you randomly determine your target before rolling to hit!) with the result being that people generally don't even attempt to use missile weapons in a close combat.
I don't care for that for a variety of reasons. First, B/X is lethal enough as is and the PCs could use the extra help of a back line of archers. Second, I'd rather give the players in the back ranks something to do while the front rank fights hand-to-hand. Third, I've never heard of any version of D&D allowing for the melee weapon equivalent of "friendly fire". Why subject archers to a significant risk of hitting their friends when the guys in front can wave their swords around wildly and never worry about hitting the wrong person?
So what I do is apply a -2 penalty to the missile attack roll for every ally between the attacker and their target. This could be modified if the target is significantly bigger or smaller than the allies in the way. My assumption is that if the attacker can't get a clear shot because of allies in the way, they will simply hold their fire. I allow for the possibility of friendly fire only if the attacker rolls a natural 1. If that happens, I randomly determine which ally was targeted instead and then have the attacker roll another attack against the ally's armor class.
This never came up in play until session 21, when Ylil's player rolled a natural 1 for his sling attack. Of the three allies between him and his target, I randomly rolled that Brother Jedidiah was the unfortunate accidental victim. Ylil's player rolled very high on the second attack roll, and the end result was that Brother Jedidiah took a sling stone right in the back of the head at close range and expired on the spot.
It's a tough job, adventuring...