Deaths due to gang violence included people hit by stray bullets, cases of mistaken identity, and relatives of gang members.