In a skillet, combine the butter, onion, and garlic over medium-high heat. Cook, stirring often to prevent browning, until the onion is translucent, about 4 minutes. Add the thyme and cook for 10 seconds to release its fragrance. Add the corn and cook, stirring, for 1 minute. Add the cream and 1 teaspoon salt and bring the mixture to a boil. Reduce the heat to medium and simmer until the corn is tender, 4 to 5 minutes. Remove from the heat.
In a food processor, combine 2/3 of the corn mixture with the white beans and puree until smooth. Return the puree to the corn mixture remaining in the skillet, or a bowl, stir to mix and let cool to room temperature. Using a pastry bag fitted with a 1/2-inch plain tip, or a plastic zip-top bag with a corner cut off, fill the cannoli shells by piping the filling into both ends of each shell.
Fill the shells no longer than 15 minutes before you are ready to serve them.