Lockouts are performed internally within the shock, often by closing out part of the dampener circuit. This would make it nearly impossible to create a general upgrade kit as shocks can have very different internals (even from the same brand).
The only possibility would be a lower end shock that shares its shock body with a higher end version that has a lockout feature. In this case you might be able to purchase the internals of the higher end version. Even then you may be missing components such as the lock out lever, plus the lower end version may be missing ports for the lockout lever.
Purchasing new rear shocks is another possibility, but it can be quite expensive and there are a lot of measurements to get correct (e.g., eyelet to eyelet length).
In short I don’t see any easy upgrade path.