Hello, and welcome.
I'm sorry Cujo is having this trouble. It's possible that he has vestibular syndrome which is usually caused by a problem with the inner or middle ear. The vestibular system regulates equilibrium and balance. It can also make him feel dizzy, so he's walking gingerly, afraid he'll fall over.
Another possibility is that he jumped down from a height, landed wrong and had a trauma to his vertebral spine, a disc or his legs or hips. This would require some imaging like an x-ray to check for any injury at the vet's office.
Not using the litterbox all the time may be related to his balance problem and he may have trouble getting in and out of the box due to that and/or arthritis. Try to get a box with lower sides, so he can get in more easily. Also, try Feliway plug in diffusers to help with the inappropriate elimination and any stress he may be feeling due to his balance problem.
Due to his senior age and the symptoms you describe, it would be advisable to have Cujo evaluated in person by a vet, asap for a diagnosis and then, treatment to help him feel more comfortable.
I hope all will be well with Cujo!
Please be so kind as to rate my answer with positive feedback, as that is the only way I receive recognition from the site for my assistance. Thank you very much!
Providing a positive rating will not end our conversation, should you need me for any follow-up. Simply click 'Reply to Expert' for clarification or additional information, if needed.