There’s an obvious parallelism betweem Mary and the Ark of the Old Covenant. As Steve Ray pointed out in his website, the allusion to Mary as being the Ark of the New covenant is clearly laid down in the Sacred Scriptures.

When writing his gospel St. Luke is clearly thinking of the Ark of Old covenant, thus he likened Mary to an Ark.

The Ark of the Old Covenant is an allusion to the coming of Jesus Christ, Mary too is seen as a type of an Ark which carried Christ for 9 months.