The answer to your question of if you will be required to pay back a portion of your down payment assistance grant depends on the terms of the grant. Although down payment assistance grants are generally structured the same way, the specific terms of the grant can vary by program and location. Reviewing your down payment assistance grant documentation should enable you to determine if the grant restricts your ability to do a cash-out refinance.
There is another point related to your question that I want to address. Most lenders require borrowers to wait a year before they will refinance a home purchase loan. So if you bought your home six months ago you will likely be required to wait another six months before lenders will consider refinancing your current mortgage. Additionally, you should confirm that your current mortgage does not have a pre-payment penalty. While pre-payment penalties are unusual, they can be costly for borrowers.