If I get my indoor female cats spayed, will they no longer spray? Or will they just spray for territorial reasons only?
Any cat can spray if sufficiently motivated to. It is a natural response.
Spaying does, however, remove a very strong trigger for a female cat. Biology demands that she broadcast to tomcats that she is ready for breeding, so come and get it. After spaying, that motivation goes away entirely.
But spaying may also be a signal for other cats to stay away, a claiming of ownership. If this is the driving force, then spraying could persist until whatever causes this distress is handled in some way.
Female domestic cats to do not "spray." Males do, not females. Females don't mark territory in any way.
If a female is urinating outside the litter box that is an entirely different issue.
Sometimes inappropriate urination locations can be a sign of a health problem which might need prompt attention.
We go by the rule that if a cat's condition or behavior changes with no obviously reason, we will get the cat examined by a vet.