I haven't met any weapons merchants, but some ships will buy your cargo from you, if you happen to be carrying what they're buying.
The way it works is pretty wonky, and devs have said they'll reevaluate it. You fly up close to the ship, your cargo disappears and credits appear. There is no confirmation, no "would you like to sell me that Rutile?" Just wham! Deal done.