I usually do side-projects on topics that interests me, and usually apply on jobs that also interests me, and I just hope for the two to converge: at some point the interviewer will ask a question about a technical topic I never worked on professionally, but on which I have intimate knowledge thanks to those side-projects.
And then I'll be able to give an interesting answer while my previous jobs and education would not have prepared me for that question.