Add filter functionality to current_instances for arrays.