General analysis of weak decay form factors in heavy to heavy and heavy to light baryon transitions