I hadn't even thought about being separated. If they are to screen a younger child, they won't let the parent remain with them???
Like I said, it's all in how you define it. TSA will tell you that they are allowing you to remain with the child and will further tell you that they will not separate you from your child, but what they REALLY mean by that is that they will not take your child out of your line of sight. In most cases they will allow a parent to stand about 4 feet away while a child is patted down, but the layout of the area can increase that distance in some cases, or add in the glass wall layer. The whole "touching" prohibition is meant to keep you from quickly stashing something inside your child's clothing and then taking it back after you have been searched. Sometimes agents will allow you to keep hold of an older child's hand if they are just refusing to cooperate and making a scene no matter what you tell the kiddo, but IME that's a bit unusual; most of the time they wnat to follow the letter of the rule, which says that passengers who are awaiting screening and those who have already been screened are not to have any contact.
Again, I'll reiterate that this is my experience with a secondary search patdown after walking through the WMD, not a situation where I've deliberately requested a patdown for my whole party. That may be handled a bit differently, but personally I would prefer to be prepared for a worst-case scenario.
If you have a child who is too young to stand unaided, you will both be patted down together. The parent is patted down first, and then the parent normally holds the child out at arm's length under the armpits while TSA does their thing, unless you have an infant carseat that has already gone through the x-ray scanner, in which case they sometimes like to have you lay the baby down in the carseat and do the check that way.
The tricky thing with young kids over the age of one is that TSA expects them to stand still 4 or so feet away and wait for you while YOU are being searched, without holding your hand or trying to climb your leg while it happens. IME, toddlers will usually do one of two things under these circumstances, and standing still quietly isn't one of them. Usually they will either cling or try to bolt. I personally always use walking reins and a chest harness in airports for just this reason, making sure that the harness has no metal parts. I can let a TSO hold the harness strap if there is an issue, and I don't have to worry about the search being endlessly prolonged because DD had to be pried off me. (When I'm traveling without DH, that is. When I'm with him we prefer to do the split-the-parents thing. Our usual technique is actually to let Parent 1 go through with all the carryon bags first, and the second parent doesn't come through with the small kids until he is clear. That way, if there is a problem, DD can be checked and then released to him while I get through. We once had the experience of going through all together when DS was little and having both of the adults selected for secondary, but not the toddler. I tried and tried to tell the TSO's that I would be happy to go with them as soon as DH was cleared, but they didn't want to wait that 2-3 minutes. It was "MA'AM -- come with me NOW or I'll have to call a police officer. Just when it was about to get ugly, they let DH go, and we learned our lesson about going through together. I think that DS was 3 when that incident happened. BTW, it happened at DEN, which has notoriously hardline TSO's.)