If you want the pattern to be made of vector objects, I would avoid explicitly duplicating the objects, unless you would end up with less than 1,000 separate paths. This can cause trouble with rendering. You can define a pattern swatch with Illustrator, then fill a large rectangle with the pattern.
If you do it in Photoshop, the easiest way is probably to exactly select the repeating rectangular area, then choose Edit > Define Pattern. After that, you can select a larger area or the entire canvas, then Edit > Fill with the saved pattern.