How to unlock my HTC desire 816 w after too many pattern attempts?
It depends on which OS you are using.  It is my understanding that phones with newer OS cannot be unlocked/reset if the device password is not known.

This is an attempt to make it more difficult for people to reset stolen phones.

Bottom line, depending on your specific device OS - you may need the password to unlock it.