Preheat a grill to medium. Make the foil packets: Tear off twenty 20-inch-long pieces of heavy-duty foil. For each packet, stack 2 sheets of foil and pull up the edges to form a bowl shape; put about 10 clams in each packet.
Divide the shallots, garlic and parsley among the packets. Drizzle each with about 3 tablespoons wine and top with 2 tablespoons butter; season with salt and pepper. Gather the edges of the foil at the top and crimp to seal.
Place the packets on the grill and cook 10 to 12 minutes, or until the clams open. (Discard any unopened clams.) Serve straight from the packet; garnish with thyme.