As you know that she will be incarcerated, you should not wait to file. You will want to have plenty of time to get into court and ask that the court order that the child will live with you during her incarceration. I've attached the link to Maricopa County Superior Court's forms. These can be altered to use in other counties in Arizona if you choose to use them.
It is impossible to say what the court will order about legal decision making (formerly known as custody), as each case is different. You should just set forth all of the reasons why you believe sole legal decision making should be awarded to you.
Moving is entirely different. I've attached the "relocation" statute, ARS 25-408 for you to read. If you wish to relocate once the child lives primarilly with you, you need to follow the provisions of this statute.
The information provided is general in nature and does not create an attorney-client relationship.Ask a similar question