A framework for second-order eigenvector centralities and clustering coefficients