Soak the beans (which Jamaicans refer to as peas in this dish) in a bowl with 2 crushed garlic cloves, 2 thyme springs, the pimento seeds, and 6 cups water, covered, at room temperature for at least 8 hours or up to 12 hours.
Drain the soaked peas, then transfer them to a medium-large pot. Add 4 cups fresh water, 2 additional crushed garlic cloves, ginger, and salt.
Bring to a boil over medium heat. Add 2 additional cups cold water to the pot, and bring to a boil again. Boil for about 45 minutes, or until the peas are just soft enough to mash with a fork with some give. As the peas boil, check the pot every 15 minutes to make sure the liquid does not fully evaporate; if needed, add more water in 1-cup increments. Once the peas are cooked, there should be no more than 1½–2 cups liquid remaining. (If there is more liquid, discard any excess).
Reduce the heat under the peas to medium-low. Add the coconut milk, all-purpose seasoning, brown sugar, scallions, scotch bonnet pepper, and remaining 2 thyme sprigs to the pot. Stir to combine. Bring the mixture to a simmer over medium-low. Allow to simmer, undisturbed, for 5 minutes.
Rinse the rice until the water runs clear. Stir the rinsed rice into the mixture in the pot. Bring the mixture to a boil over medium-low. Reduce the heat to low, and stir in the butter. Cover the pot with a fitted lid, and cook over low heat for 25 minutes.
Remove from heat. Let the rice and peas stand, covered, for 10 minutes. Remove the lid, and fluff with a fork. Serve hot.