Yes, hero factory and bionicle pieces works just fine. In fact there is an moc theme called bioformer, where people building legoformers using such parts. You can try checking drscorpionx's channel on youtube, for example.
As for building with normal lego, i can't deny that hinges and balljoints are essential, so if you plan to build a legoformer, do try to stock them up. While building a functioning legoformer without using much hinges and joints is still possible, big compromize will be needed, like what i made here.
And also, like what the librarian above me said, while reverse engineer a transformers toy works, there are also some parts that are really hard to do, especially when it comes to movie toys. From my experience, i have learned that simple transformation actually works better for legoformers, especially for smaller scale. And simple doesn't always means boring. You can still come up with interesting transformation while keeping it simple, the librarian's flickr gallery shows some example of that. So my advice, look around the creations of legoformer builders, and try to come up with your own idea. I'm sure you can do it.