Zend certified PHP/Magento developer

Find all selected elements on the page and add them to a separate section

There is a page on which there are many elements and which have checkboxes, here is an example of one of them.

app/code/Test/Module/view/frontend/templates/items.phtml

elements set

How to use knockout js or jquery to create a functional in which selected elements will be added to the selected elements section?
+ How to limit the number of selected items to 4

enter image description here