We mixed leeks with equal amounts of red and white pearl onions and cipollini (flat little Italian onions), but you can use any combination of small, sweet onions.
Bring a medium saucepan of water to a boil. Add white and red pearl and cipollini onions, and boil for 1 minute. Drain. Let stand until cool enough to handle, then carefully peel, leaving root and stem ends intact. Transfer to a large bowl, and add 2 tablespoons olive oil, 1 teaspoon salt, and 1/4 teaspoon pepper; toss to combine.
Meanwhile, remove any damaged outer leaves from leeks, then trim and discard dark-green tops. Trim roots of leeks without cutting off the base. Cut them in half lengthwise, and let soak in a large bowl of cold water for 5 to 10 minutes to rid them of dirt and sand. Lift leeks from water, pat dry, and place in a medium bowl. Add 1 tablespoon olive oil and 1/2 teaspoon salt; toss to combine.
Heat a large skillet over medium-high heat and add 1 tablespoon olive oil and leeks. Saute leeks until slightly tender and lightly browned, about 5 minutes. Remove leeks from skillet, and set aside.
Add remaining tablespoon oil and white, red, and cipollini onions to skillet, and saute turning occasionally, until browned all over, about 5 to 7 minutes.
Reduce heat to medium low, and add balsamic vinegar and stock; cover skillet, and cook until onions are tender, 20 to 30 minutes, adding the leeks to pan after 10 to 15 minutes. Uncover, and add butter; increase heat to high, and cook, shaking pan occasionally, until liquid reduces to a glaze and coats the onions, 3 to 4 minutes. Transfer to a serving dish, and garnish with thyme leaves. Season with salt and pepper if desired, and serve immediately.