Northern Mexico is super dangerous so realistically you would have to fly. And I don't think the TSA will like you carrying a multi year supply of meds back to US
The pharmacies right by the border are fine, but if you want a nicer area, walk across the PedWest crossing and stand in the Uber waiting area for an Uber to go to Playas. Then you can go somewhere like Farmacias Roma or Farmacias del Ahorro or a bunch of other nice stores with people wearing lab coats. You could also just go to Walmart for medication if you want but recently they seem to be missing basic things I needed so they probably aren't the best.