What the OP is asking is a philosophical question.
To answer it, I'll throw in this metaphor: you can understand a car's engine completely, but still have absolutely no idea about all the places it's ever been or will ever go. Let alone all of the places it *could* go.
As to whether I think we can ever understand how the mind works, precisely, like how an engine works, my guess is no. Consciousness is one of the greatest mysteries of science, and the more we look into it, the more it seems as if only part of it exists in an observable state.
We would need to understand the universe first, in order to understand our own minds.