In a blender or food processor add yellow onion, green onions, Habenero pepper, garlic, soy sauce, lime juice, thyme, allspice, black pepper, nutmeg, cinnamon, coriander, and salt.
Blend just until combined and the onion has broken down.
Drizzle in enough olive oil to make a thick marinade.
Pour marinade into a large 1-gallon ziptop bag and add chicken.
Secure the top of the bag and move the chicken around in the bag to make sure it's completely coated.
Add bag to a bowl or dish and marinate overnight or at least 4 hours. Keeping the bag in a bowl/dish helps keep your fridge clean in case there is a leak in the bag.
Once the chicken is done marinading heat your grill to medium heat. Since you are using bone-in chicken you need to cook it long enough to fully cook the inside meat without burning the outside.
Grill for about 30-35 minutes until the outside of the chicken is crisp and the inside is fully cooked.
Serve with a sprinkle of cilantro and a wedge of lime if desired.