Ray was once a normal Pikachu until captured by Team Rocket.
He was experimented on and turned into a Rocketchu, but the experiment failed and he was left only half finished and he still had his Pikachu memories. This made him disloyal to Team Rocket so he soon escaped and cast himself away into the city, as he was no longer welcome into his old forest home because of his strange appearance.
As he grew older he got more streetwise and now has many friends/allies/enemies within the city. Including four children.
Link
Cheera
What an interesting character!