The real rule turns out to be simple (although non-obvious): "Declaration matches usage." So, for example, if you want a pointer to a function returning a pointer to an array of 3 integers, you'd want
(*(*f)())[3 - 1]
to evaluate to an int, so the declaration would be
int (*(*f)())[3];