How to loop through ALL and JUST searched Items?

You can get a “Select” object with the filters applied and turn that into SQL:

$select = get_db()->getTable('Item')->getSelectForFindBy($params);
$sql = (string) $select;