Using expressions and Maya Utility nodes, Luiz Philippe Moreira provides an overview for creating stretchy IK joint chains, and shows how to set up a stretchy IK joint chain which will be driven by an IK solver using some code generating utility nodes.

Going over the process of setting up stretchy ik joint chains using expressions and utility nodes Maya

Luiz writes an extensive post on the process of creating stretchy IK joint chains in Autodesk Maya and also notes that his lpStretchyIKChain.py tool uses the same technique, and can be found on his site for download here.