Under state law Arizona Revised Statute 12-558.02 , anyone who believes a child or animal in a hot vehicle is in “imminent danger” of suffering injury or death can break a window to get them out without fear of a lawsuit.
And remember, try to avoid breaking the window immediately next to a child, if possible. Flying shards of glass can cause injuries.