CA law does not address this issue in its statutes. In fairness to CA, despite its extreme far-left orientation, this is a very thorny issue because it is so dynamic.
As a CCW instructor I had to deal with what is, and is not, codified.
CA Penal Code section 417(a)(2) deals with drawing or displaying a firearm (AKA brandishing, although the word is not used in the section). It prohibits drawing or displaying a firearm in a rude, angry or threatening manner, except in self defense. As apparently clear as this is, it does not allow for brandishing a deadly weapon to deter a deadly force attack, nor to hold someone. Obviously one can draw a firearm for the purpose of self-defense (or the defense of a third person) against an imminent deadly force attack, and then have the attacker decide not to go forward with the attack due to the presence of the firearm. Other than the preclusion against deadly force on a fleeing felon (Garner v. Tenn, but already the law in CA prior to that SCOTUS decision) the matter is not otherwise addressed.
What I would tell my students is that there is greater latitude for the use of deadly force within one's residence because of the invasive context and the assumed greater danger to the occupants, but in covering this issue in detail I made it clear that if an intruder attempts to flee, deadly force is still not authorized because the danger flees with the intruder. Incidentally, CA is a stand your ground state based on case rather than statutory law. The precedent cases are old and well established. This is very good for the citizens because it means that the CA legislature and governor, no matter how anti-firearms they are, cannot negate this case law via legislation. If they thought they could, I am sure they would try.
Keeping 417 PC well in mind, I advised my students that if drawing a firearm in the good faith intent to use it legally and the attack did not materialize, to put the firearm away. That of course covered the issue of holding someone at gunpoint, because there is just no legal allowance to do so.
As far as securing someone as an armed citizen, it is a dangerous practice both physically and legally. During my career I had countless instances of coming across vehicles whose occupants had just committed violent felonies (part of our area had a great deal of gang activity). During my time as a Sgt, then Lt, I was solo. It at all possible I would not make the stop until I had enough back up so that we could safely remove and control the occupants. In a few instances where the actions of the suspects forced me to make the stop, I used the PA to order the occupants to remain inside the vehicle. I used the driver side door as cover. Fortunately I always got compliance.
One last point on securing arrestees; it is not not possible to cuff a resisting suspect. If the suspect will not comply then the suspect must be subdued to the point where he/she can be cuffed. I would explain this to suspects: Either way they were going to jail; the only question was whether it would straight to jail or to jail via the hospital with additional charges. If the latter transpired I would make sure my report reflected that the suspect had been duly warned.