Similar Items: Efficient computation of shifted linear systems of equations with application to PDEs