Miles for Mary, the sly new play at Playwrights Horizons, has a lengthy writing credit: “Written by Marc Bovino, Joe Curnutte, Michael Dalto, Lila Neugebauer and Stephanie Wright Thompson in collaboration with Sarah Lunnie and the creative ensemble of Amy Staats & Stacey Yen.” That credit may be accurate, but it’s also a wink at the audience. Miles for Mary is a comedy about a committee at a high school, and, defying dire axioms about things done by committee, it’s a hoot.