Combine the yogurt, olive oil, grated garlic, lemon juice, cumin, smoked paprika, coriander, turmeric, cinnamon, allspice, cayenne, salt, and black pepper in a large mixing bowl. Whisk until the mixture is uniform and the spices are fully incorporated with no dry pockets. The color should be a deep ochre-orange.
Add the chicken thighs to the bowl and turn each piece until fully coated. Cover tightly with plastic wrap and refrigerate for at least 2 hours, or up to 24 hours. Longer marination deepens the spice penetration and allows the lactic acid in the yogurt to work on the muscle fibers, which keeps the thighs tender even at high roasting heat.
Preheat the oven to 230°C / 450°F with a wire rack set inside a rimmed baking sheet on the middle shelf. Spread the onion half-moons across the baking sheet beneath the rack. The onions will caramelize in the dripping marinade and can be served alongside the finished chicken.
Lay the marinated thighs flat on the wire rack, spaced so they are not overlapping. Roast at 230°C / 450°F for 26 minutes. The edges should char and pull slightly away from the rack, and the surface will look deeply browned with some blackened spice patches, which is correct and desirable. Confirm doneness with an instant-read thermometer; the thickest part of each thigh must read 74°C / 165°F.
Transfer the thighs to a cutting board and rest uncovered for 5 minutes. Slice against the grain into strips roughly 1cm / 0.5 inches wide. Resting allows the internal juices to redistribute, and slicing thin mimics the shaved texture of vertical-spit shawarma.