The "best" really comes down to what you want out of an archer, besides just shooting arrows.
Fighter can make the most attacks with a bow, with battle master giving tons of utility with those shots. Aracne archer is pretty awful as written compared to battle master, with the features being a less frequent but situationally more powerful effect.
Hunter ranger can make a Volley and bombard an area with arrows. Other subclasses don't really impact the bow that much.
Rogue is good for the high damage single shot. If you want to be like a sniper, one shot one kill kinda deal, rogue is good for that due to sneak attack. Scout is good if you want to be mobile, but none of the rogues get the Archery fighting style which is a bit of a bummer, meaning you'll need to spend a feat for it.
Only other class would be a battle smith artificer using a repeating shot infusion on a crossbow, which has the highest damage dice for a ranged weapon at a d10, which works well with extra attack. Pair that with your steel defender and some magic and you have yourself an archer backed up by their own spells and a personal melee npc to keep enemies off them.
To start with, let's compare a non archer warlock. You don't need to go hexblade as this works with any subclass, and all you need to do is pick Eldritch Blast for a damage cantrip (which almost everyone does) and then pick Agonizing Blast at 2nd level for your invocation (which almost everyone does). Now you deal 1d10+CHA mod per beam, which goes up to two beams, then three, then four. This totals 4d10+(CHA mod X no. of beams).
Now for an archer build, we need to lock in Hexblade as our subclass, then not use any ranged weapon as your Hex Warrior weapon unless you want to use a hand crossbow for 1d6 damage. Then at 2nd level pick whatever Invocations you won't be attached to, 3rd level you go for Pact of the Blade for your Pact Boon and swap one of your previous Invocations for Improved Pact Weapon. Now you can make a heavy crossbow to deal 1d10+CHA mod. Then at 5th level you take the Thirsting Blade Invocation to get the equivalent of Extra Attack and now you can rock 2d8+(CHA mod X 2) by using a longbow, as crossbows can't attack more than once per turn as they still have the ammunition property. Meanwhile Eldritch Blast will gain another attack at later levels, leaving the Hexblade behind.
The subclass, two invocations and a pact boon all to deal two attacks with a longbow, or you could just spend one Invocation and do much better. Honestly, the value for a Hexblade is the extra AC, the Curse and Armor of Hexes while slinging Eldritch Blast around from range with a back up melee weapon if you desperately need it.
Certainly not bad. Invocations will allow you to attack twice and grant you a free +1 magical weapon, meaning you'll be more accurate with the weapon than with Eldritch Blast. Eldritch Blast will probably do more damage on average than your ranged weapon will, But Hexblade gets access to a couple of the Smite spells that can be used with ranged attacks, and Eldritch Smite is cool too. When your slots hit level 5 at Warlock level 9, with no setup you can attack twice with your bow ( 2d8 +12), one attack using Banishing Smite (5d10 force, possible banishment) and one attack using Eldritch Smite (6d8 force, knocks prone). Hexblade's Curse is okay too, but the 30ft range is a little restrictive for an archer.
There are so many options and I got confused, each have their advantages.
The "best" really comes down to what you want out of an archer, besides just shooting arrows.
Fighter can make the most attacks with a bow, with battle master giving tons of utility with those shots. Aracne archer is pretty awful as written compared to battle master, with the features being a less frequent but situationally more powerful effect.
Hunter ranger can make a Volley and bombard an area with arrows. Other subclasses don't really impact the bow that much.
Rogue is good for the high damage single shot. If you want to be like a sniper, one shot one kill kinda deal, rogue is good for that due to sneak attack. Scout is good if you want to be mobile, but none of the rogues get the Archery fighting style which is a bit of a bummer, meaning you'll need to spend a feat for it.
Only other class would be a battle smith artificer using a repeating shot infusion on a crossbow, which has the highest damage dice for a ranged weapon at a d10, which works well with extra attack. Pair that with your steel defender and some magic and you have yourself an archer backed up by their own spells and a personal melee npc to keep enemies off them.
How is the Hexblade warlock?
It's pretty bad for an archer.
To start with, let's compare a non archer warlock. You don't need to go hexblade as this works with any subclass, and all you need to do is pick Eldritch Blast for a damage cantrip (which almost everyone does) and then pick Agonizing Blast at 2nd level for your invocation (which almost everyone does). Now you deal 1d10+CHA mod per beam, which goes up to two beams, then three, then four. This totals 4d10+(CHA mod X no. of beams).
Now for an archer build, we need to lock in Hexblade as our subclass, then not use any ranged weapon as your Hex Warrior weapon unless you want to use a hand crossbow for 1d6 damage. Then at 2nd level pick whatever Invocations you won't be attached to, 3rd level you go for Pact of the Blade for your Pact Boon and swap one of your previous Invocations for Improved Pact Weapon. Now you can make a heavy crossbow to deal 1d10+CHA mod. Then at 5th level you take the Thirsting Blade Invocation to get the equivalent of Extra Attack and now you can rock 2d8+(CHA mod X 2) by using a longbow, as crossbows can't attack more than once per turn as they still have the ammunition property. Meanwhile Eldritch Blast will gain another attack at later levels, leaving the Hexblade behind.
The subclass, two invocations and a pact boon all to deal two attacks with a longbow, or you could just spend one Invocation and do much better. Honestly, the value for a Hexblade is the extra AC, the Curse and Armor of Hexes while slinging Eldritch Blast around from range with a back up melee weapon if you desperately need it.
Certainly not bad. Invocations will allow you to attack twice and grant you a free +1 magical weapon, meaning you'll be more accurate with the weapon than with Eldritch Blast. Eldritch Blast will probably do more damage on average than your ranged weapon will, But Hexblade gets access to a couple of the Smite spells that can be used with ranged attacks, and Eldritch Smite is cool too. When your slots hit level 5 at Warlock level 9, with no setup you can attack twice with your bow ( 2d8 +12), one attack using Banishing Smite (5d10 force, possible banishment) and one attack using Eldritch Smite (6d8 force, knocks prone). Hexblade's Curse is okay too, but the 30ft range is a little restrictive for an archer.