There is no requirement in terms of where an application for a Permanent Resident Visa may be lodged.
Regardless of where the application is lodged, applicants for a Permanent Resident Visa must meet all of
RV2.5(a) to RV2.5(e). For someone whose Resident Visa is already expired, RV2.5(a)(ii) is of particular importance.
If a person with an expired Resident Visa does not meet the requirements for a Permanent Resident Visa, they may (or may not) be eligible for a
Second or Subsequent Resident Visa instead. If the requirements for a Second or Subsequent Resident Visa also cannot be met, the person must submit a further application for the original residence class visa if they still wish to live in New Zealand.
Your query regarding demonstrating a commitment to New Zealand by means of significant time spent in New Zealand is answered by RV2.5.1.
RV1.20 determines the eligibility of people who were not principal applicants in the original residence application to be granted a variation of travel conditions, Second or Subsequent Resident Visa, or a Permanent Resident Visa.
R2.1 determines who can be included in an application for a variation of travel conditions, Second or Subsequent Resident Visa, or a Permanent Resident Visa.
Reading both of these together will answer your question.