Dice the yellow onion and red pepper. Peel and dice the carrots. Mince the garlic. Dice the potatoes. Cut corn off of 6 cobs (if possible, use a bundt pan: place the corn cob in the center ring and cut the corn down into the pan). Reserve the cobs. Drain and rinse the white beans; set aside. Remove the leaves of thyme and set aside.
In a large pot, melt 2 tablespoons butter. Saute the onion and bay leaf 4 minutes, until soft. Add the carrots, red pepper, and garlic, and saute for 4 minutes. Add corn kernels, corn cobs, potatoes, and milk. Bring to a boil. Then simmer, covered, for about 15 minutes, stirring occasionally.
Remove the corn cobs and bay leaf. In a small bowl, mix the cornmeal or masa with ¼ cup water, then add to pot. Add the kosher salt, white beans, and fresh thyme. Heat through for about 5 to 10 minutes, until the vegetables are tender and the soup is thickened a bit (mash down lumps of cornmeal if any occur). Serve warm.