I'm sorry things are so bad, biffa :(
If your instincts are telling you not have her home, then don't. Your job is to do the best you can for her, and at this point in time that may mean not having her home.
You can still be 'there for her no matter what' if she lives elsewhere... In fact, if she is violent and out of control, it will probably be much, much harder to be 'there for her' if she is living with you, because then you will have to put all/most of your energy into crisis-management, protecting her from harm when you're not well-equipped to do it, and self-preservation.
You keep your sanity by detaching and by looking after yourself, as brightspark says (she knows what she's talking about; she's Been There too).
Definitely get a CAMHS referral if you haven't already. But don't put all your hope into getting helpful support from mental health services. They do not seem to be very good at supporting kids - esp those who are 'acting out' rather than being depressed and/or self-harming. Most parents (including me) seem to report frustrating months or years trying and failing to get support... :( It is difficult. Counselling needs to be voluntary - you can't force a child/YP to go, and if you try, it doesn't work. And of course most/many young people, especially the angry ones, don't want to sit down and talk about themselves, or can't. I'd say still try to get your daughter some support, because it will help if you can arrange it and she will go... But don't rely on it.
No-one has mentioned drugs yet, so I will. Sorry. If she is living in a children's home and already using alcohol, then it is extremely likely that she is also using skunk (a strong, modified form of cannabis ). It is very easy to get hold of, and will definitely be available from other kids in the home. It is a powerful mood-altering drug - it dis-inhibits users so they can't control themselves, and causes aggression in many and even psychosis in some :(
It is very hard to stop kids from using skunk once they get into it, because it is so widely available, but she is so young that even if she has started she can't have been using it long, so I would definitely say it's worth a try. Its long-term effects can be so damaging that it may be the strongest argument for getting her out of care, where she will certainly have easy access to it... But of course there are no guarantees you'd be able to stop her either.
As for 'what to do', this is the difficult, heart-breaking thing, because there is so little you can do. When people talk about their older teens (14/15+) I tend to say "You can't control them; they have to control themselves". But that doesn't sound right for a 12 year old, because of course they can't control themselves properly. I really feel for you.
I would say though, that punishment doesn't ever seem to work - not for my DS and not for other kids I know or have heard about. Whether or not she is psychologically ill, it is clear that your daughter is really struggling with life. She is probably feeling out-of-control. Her behaviour is awful, but it doesn't sound like she's doing it 'deliberately' - it sounds like she can't stop herself. I don't think punishments/sanctions actually help or work with kids like your DD (and my DS) - they just add to the anger and the feelings of powerlessness.
I think incentives work much better, especially very short-term ones that build up to something bigger. Focus on and reward the positive behaviour you want, not the negative. When my son stopped going to school, what worked to get him back was paying him: £2/day if he went, with a bonus if he finished first a week, then a fortnight, then a whole half-term. If you can find something your daughter wants, I would suggest rewarding her with it: "We will give you X for every day you keep calm, and XXX if you manage a whole week staying calm". IMO it is very important to make the rewards achievable - make sure you set the 'threshold' for some rewards low, so she actually succeeds. She needs to feel what success feels like: IME, many/most kids who go off the rails seem to only know or remember what failure feels like :( Then gradually 'raise the threshold' so she has to try a bit harder to succeed, but not so hard that she starts failing again... It's a bit like limbo dancing
... It's a difficult balance... The idea is to make her 'remember' that re-engaging and behaving decently actually feels better than disengaging or behaving badly.
Sorry, I've gone on a bit. Hope some of it is helpful :)