Extended Bloch theorem for topological lattice models with open boundaries