Hasmany + Viatable

How can I link 2 tables using MANY_MANY? The link() method allows only one link. But if I need to check 5 fields in a form (checkbox), how can I link correctly? Should I use an instance of a model every time and add a new link in a loop?