Lucy, here's how I did this job on aluminum siding. Take a cedar 2x4 (not pressure treated) and saw it at a 45 degree angle across the 4" side on your table saw. The measurement from the fence side of the blade to the fence will be 1-3/4". Hopefully, you can get some idea where the studs in your wall are located. Locate one of the pieces you sawed under the thick part(bottom) of a piece of siding one "board" under the height where you want the windowbox to be and centered where you want the box to be also. Mark the 2x4 half to show the rough area where the studs are right behind the 2x4. You will be mounting this with the point that you formed by sawing it pointed up on the outside (away from the wall).
Put some paintable sealing caulk under the piece of vinyl above where you are going to mount the box to seal that area and some on the back of the cut 2x4 where the screws will go into the studs. Then run 3-1/2" or 4" galvanized deck screws (the ones with the heavy, hot dipped galvanize) or stainless through the 2x4 and into the studs. The screws should be going through the full 1-1/2" thickness of the 2x4, through the vinyl where it is closest to the wall, and then into the wall studs.
Building the flowerbox can be done before or after the above. 1x10 or 1x12 cedar is great for this. Make the box about a foot shorter that the 2x4--or more accurately, you should have cut the 2x4 about a foot shorter than you expect the box to be. One quick way is to start with two 1x12 8' and one 1x10 cedar boards and cut them to 7' long. Save the drops! With the 1x10 board laying flat on the floor, have someone help you hold the others in position with the "back of the box" 1x12 board behind the board laying flat. Put one of the 1x12 drops standing up in the 90 degee angle that is formed and mark it for the exact height to match the 1x12. Put the other 1x12 board angled out at the top to as wide as it will go and still hit the edge of the drop (end piece) that you are measuring. Mark the end peice for height at this intersection which will be lower than the back and mark the end piece for width across the bottom 1x10 also. You can start driving 1x5/8" galvanized or stainless screws to hold the bottom and back in position and cut one end piece to fill the space and with you are happy with the dimensions of all 4 sides, mark the other 2 drops to match. One piece, fom the 1x10 will be smaller but you can use some of the scraps to fill in and still use this for a center stiffener. The other 1x12 drop is for the other end. Screw the whole mess together. Where everything goes should be pretty self-evident by now. Then screw the other half of the 2x4 to the back of the back piece with the point down and away from the back of the box. Use a 1-5/8"screw about every 8" here. Now mount the box by making the 2 points of the 2x4 interlock and drill some 3/4" or 1" holes in the bottom, toward the front but not where you will hit a screw. Then put a layer of fiberglass screen wire on the inside bottom. If you wish paint the box after priming and then artfully place Martha Stewart style stencils on the front and ends. MamaLizz did that and it looked great. Paint the 2x4 on the wall, too.
Throw in some pea gravel to hold the flower posts you will use in place. It really makes more sense leaving your plants in clay pots in the box than filling the whole thing with dirt. You might have to water a little more often though.
Hers is several years old and other than the paint looking a little tired, still looks great. She takes the box off in the winter and should take the stones out when she brings it inside. Cedar lasts a long time, even without the paint. Cedar boards are normally rough on one side and smooth on the other and you will have to decide which you want on the outside. No leaks into the house either and it's on the west side.