Does butter have to melted in order to cut it into the flour?

No, I actually recommend keeping it at cold as possible so you do not risk overdeveloping the gluten in flour. The less handling the flour goes through in the mixing process, the lighter and flakier the end product is.