Of course! You can file a lien against the entire complex by naming the owner’s association. In this case, the association will pay in full, or an individual unit owner can pay their proportion of the lien amount to release their unit.
You can also file a mechanics lien on an individual unit given the owner has expressed consent to the work.