To be fair... he was given tons of looks with the Leafs... he just couldn't figure out how to put his game together in any reasonable fashion.
Personally, I believe the biggest challenge for him Toronto wasn't really "fixable" -- which is that the Leafs need every player to do something specific. Matthews, Marner, JT, and Nylander are there to create the chances. Their linemates, there to retrieve the puck and go to the dirty areas of the ice. Their 3rd line, there to receive heavy defensive zone usage, with an emphasis on transition up the ice. A 4th line player isn't going to get a ton of minutes at 5on5, so have to bring a ton of energy every shift.
Ritchie doesn't have the "motor" to be the puck retriever a la Bunting/Kerfoot, or to play on the 4th line. He certainly doesn't have the transition game to play on the 3rd line like Kampf/Mikheyev/Kase/Engvall. When you go through that process of elimination, it's just not going to work.
Arizona has the luxury of no pressure, and nowhere near the talent Toronto does. They can put Ritchie in an offensive role, but not necessarily as the puck-retriever. Heck, even in Boston, they were better equipped to use Ritchie than the Leafs were.