Heat oil in a large 5-quart saucepan over medium heat. Add garlic, green onions, and thyme; cook until wilted, about 2 minutes. Add the rice, kidney beans, stock, coconut milk, Scotch bonnet pepper, salt, sugar, black pepper, red pepper flakes, allspice, and cayenne pepper.
Bring to a boil, uncovered. Reduce heat to low and cover. Simmer until rice is tender and liquid has evaporated, about 20 minutes.