I have run across a movie called "12 Years a Slave" and am a bit confused with the title. The first suggestion to come to my mind is that it means 12 years of slavery, but I'm not sure. 

Could you explain this expression, please?  

Can it be used in another context except as a title of a movie/book/article?

And could you give some  examples of its usage, then.