Stealing characters is practically a time-honoured profession. Firstly there’s real life. These are the people we’re closest to: workmates; children; sweethearts. And haven’t we all based characters on ourselves?
Then there are tropes we can borrow or pinch. Holmes is a trope-character, because he’s been recreated and borrowed so many times.
However, there are rules to both borrowing and stealing. With borrowing you say to the reader: ‘Hey, look! This is a character you already know!’ Sherlock Holmes might be homosexual or aspergersy in your fiction, but you’re always displaying your library card.
Stealing is more underhanded. The idea is to change details and traits in order to make a known character less recognisable. There’s a continuum to this, of course. One one end — we’ll call this the ‘lazy’ or ‘slack stealing’ end — a writer changes a few basic details, a bit like giving a wanted man a false moustache and haircut. Anyone who looks closely can see the similiarity, but perhaps they won’t look. At the other end, practically everything except your core idea of the character’s personality is altered to suit your work. This can produce a revolution in characterisation. What do you factor in to create this new setting and set of ideas? What do you import from Sherlock and what do you jettison?
None of this is really stealing, of course. Arguably it’s just accessing a lineage of characterisations: Sherlock himself evolved out of an ancestry including Edgar Allen Poe’s The Murders in the Rue Morgue. But whether you import a trope-character blatantly or discreetly, it’s what you change and why that matters.
So steal away, if you wish! Just make sure you either spell out your homage — or camouflage it to the point where only you notice!