As I mentioned above, even though the characters are based out of a default fantasy kingdom, they will be wandering into Darokin and Glantri which are countries inspired by renaissance level cultures. Darokin is based on renaissance Florence and Genoa with a strict plutocratic government. Glantri is based on renaissance Glantri with the country being a "mageocracy" rather than plutocracy. Because the players will likely be traveling into these two nations, I had to ask myself whether or not I wanted to include firearms in my D&D campaign. After some back and forth, I decided that I would indeed be introducing characters who use Muskets, Pistols, and Arquebuses, but limiting them to Darokinian society.
In preparation for this move, I purchased the Tal'Dorei Campaign Setting by Green Ronin in the hopes that it included the rules for the Gunslinger archetype for the Fighter Class. It turns out that it wasn't necessary to purchase the full campaign guide, as Matthew Mercer has been kind enough to provide the Gunslinger rules as a Pay What You Want file. After reading the archetype, I found that it didn't fit exactly what I wanted to have in my games. The Tal'Dorei Gunslinger is closely based on the Pathfinder Gunslinger character class from the Pathfinder Ultimate Combat Guide and as cool as that class it, it comes with all of the "fiddliness" of the Pathfinder system. Matthew Mercer's Gunslinger kept that fiddliness and I wanted a class that fit with the simplicity of 5th edition.
In the end, I read through the existing archetypes and feats in 5th edition and realized that I didn't need to come up with an entirely new archetype or create new feats. All I needed to do was reskin some existing rules to fit the theme.
The first reskin I will be using in my game is the creation of a Blackpowder Marksman feat. The feat will be identical to the Crossbow Expert feat on page 165 of the 5th Edition Player's Handbook. That feat is pretty powerful and makes crossbow using Fighters extremely powerful options in 5e. A key element is the first benefit which lets those who possess the feat to "ignore the loading quality of crossbows with which you are proficient." In other words, it allows crossbow using Fighters to attack more than once when using an Attack action. I thought that it was fair to have a feat that applies all of these benefits to a person who uses black powder weapons.
While I don't want to spend any real time getting into the weeds of the Arquebus > Crossbow > Longbow > Shortbow argument, I will share the reasons for why I am happy with this quick fix. First, as argued effectively by Richard Berg in his wargame Arquebus, while the longbow's effectiveness had been reduced by the innovation of plate armor, "crossbows took more time to wind and fire than an arquebus, which had similar penetrative abilities but a far lower rate of fire." Looking at the stats for the crossbow and comparing them to the longbow, we see that these attributes are taken into account in 5e. The heavy crossbow does 1d10 damage and requires reloading while the longbow does 1d8 and doesn't. The Crossbow Expert feat allows a Fighter to use a crossbow with the same rate of fire as a longbow, something ahistorical but perfect for fantasy. In D&D a combat round is only 6 seconds long and a high level Fighter can shoot his longbow 8 times in a combat round (and thus a crossbow 8 times). That's not at all realistic, but it allows the damage curve to keep up with mages and hand to hand combatants. This is high fantasy after all and limiting arquebus/musket use to 4 shots per minute might be accurate, but it wouldn't be fun. So long as you keep the damage for the black powder weapons within reason (which the DMG does), game balance is retained.
Once I made this slight concession to fun over fact, I began looking to the character class archetypes to see how they fit the model of Musketeer. What I found was that two of the archetypes in the Player's Handbook reskinned nicely to be gun toting characters. I was especially impressed with how the Battle Master archetype fit for Musketeers. Since only a few of the maneuvers for the Battle Master specified "melee weapon," it meant that these abilities could be used with missile weapons with only minimum change. I quickly wrote up a page using The Homebrewery that included the Musketeer archetype based on the Battle Master. I haven't stated up the Eldritch Knight version, but if one limits the spell list properly it's easy to see spell as "magic ammunition."
Lastly, I created a background that would allow even non-Fighters to be proficient in "simple" black powder weapons and classified the arquebus as a simple weapon with the pistol and musket counting as martial weapons in Darokinian Society.