Drawing a line with varying width

I’m drawing polylines, and found it might be helpful to define the width of each segment of the line independently. Is there an existing graphic type that lets me do this? The lines have a large number of segments so it would be preferable to avoid having an entity hierarchy that uses an entire sub-entity for each segment of the line. Ideally, I’d be able to define a single array of N positions and a separate array of N-1 widths, or one array of [Cartesian3, number] tuples.