function defineShapes( tmpl, shapes ) {
	var i;
	for ( i = 1; i < shapes.length; i++ ) {
		tmpl = replace( tmpl, '{{NDARRAY_SHAPE_'+i+'D}}', shapes[ i ].join( ', ' ) );
	}
	return tmpl;
}
Defines array shapes in a provided template string.

@private
@param {string} tmpl - template string
@param {Array<Array>} shapes - array of shape arrays
@returns {string} updated string