First of all: there is absolutely no need to use threads for this. That would only complicate things greatly for no gain what-so-ever.
What you want to do is something like this (can be optimized slightly, but I tried to favor simplicity):
In your game loop (each frame):
1. Check if the current number of rectanges that you have is below the number you want to have. If it is below the wanted count, go to 2. Else go to 3.
2. While you have not yet reached the desired number of rectangles, generate a new one and place it into your container of rectangles (as Hapax said, a std::vector would be ideal).
3. For each rectangle in your container, move it downwards by an amount corresponding to its desired velocity relative to the time since last frame (delta time). If the rectangle is now outside the screen; remove it from the container.
4. Clear the screen.
5. Iterate your container and draw each rectangle.
6. Display the result.
7. Repeat from step 1 for the next frame.
Some links that may help you - read them carefully (possibly multiple times until you are sure you understand them):
On random number generation:
http://en.cppreference.com/w/cpp/numeric/randomOn game loops in general:
http://www.koonsolo.com/news/dewitters-gameloop/On achieving smooth motion:
http://gafferongames.com/game-physics/fix-your-timestep/On general gamedev stuff:
http://www.redblobgames.com/http://gameprogrammingpatterns.com/I hope that helps.