loop through rows in a model

How do I need to resolve this issue same as above, when I am using above code, only pushed one record , not able to send to list of ids param , can u share a piece of code.