How to cut a rectangle out of a cylinder?
Your shape is a little bit more complicate than just rectangles on cylinder, but if I had to do the basic shape of rectangles on cylinder, as it is a pattern repeated around a circle, I would do it with a Simple Deform modifier / Bend mode:


First create your pattern with a plane that you rotate, subdivide, extrude, as it is symmetrical on the X, Y and Z axis you can use a Mirror modifier with the Clipping option activated.





Repeat the pattern with an Array modifier. Enable the Merge and First Last options.





Apply the rotation of your object (ctrlA) to make sure it is. Give your object a Simple Deform modifier, choose the Bend mode and a Deform Angle of 360°.





Now as you are going to add a Subdivision Surface it's hard to keep a rectangle without completely messing the mesh. Here is the topology I would personally use: Create a bevel on the 90° rectangle angle, join some vertices, dissolve some edges, add some edge loops to sharp the angles, as below.


 

You can continue to work on your basic shape so that it looks more like the real one.