Place 3 command blocks
Set them to repeat mode
And set it to always active
First command:
execute at @e[type=minecraft:spectral_arrow] run summon minecraft:arrow
Second command:
kill @e[type=minecraft:spectral_arrow,nbt={inGround:1b}]
Third command:
execute at @e[type=arrow,nbt={inGround:1b}] run summon minecraft:tnt
Get a crossbow and get a spectral arrow, load it up and fire
How it works is when you fire a spectral arrow the command block summon a arrow at the current position of the spectral arrow with a delay of 1 tick
Which creates a line of arrows
Since the arrow are summoned they have no momentum it falls on the spot
The second command kills the spectral arrow when it lands so it cant spawn more arrows to prevent lag
The third command summons a "primed tnt" (which is an instant explode tnt)
When the arrow (summoned by the spectral arrow) touches the ground
And the tnt launches the arrow up in the sky and re-land on the location approximate to where it last lands and summons an other tnt which launches the arrow in the air again
This repeats until the arrow reaches bedrock or despawn
Note:
This may lag
You can use a bow as long as you use a spectral arrow
Use the this command to stop lag if there is any
/kill @e[type=minecraft:arrow]
A demonstration
https://www.youtube.com/watch?v=U9Fz3Au1lIw&feature=youtu.be