In order to study magnetostatic interactions in magnetic arrays, a two-dimensional pattern of hard magnetic (001) L10 CoPt squares embedded into a permalloy matrix was fabricated. The structural and magnetic properties of these arrays were characterized by magneto-optical measurements, atomic force and magnetic force microscopies. The hard magnetic squares are not exchange coupled to the soft magnet, yet a magnetostatic coupling was observed. This coupling modifies the domain structure of the permalloy matrix. In periodic arrays of embedded CoPt squares, the stray field interaction induces a long-range ordered domain pattern in the soft magnetic matrix and short-range correlations of edge domains in adjacent CoPt squares.