A comprehensive approach for the eigenproblem of beams with arbitrary boundary conditions