Computing linear sections of varieties: quantum entanglement, tensor decompositions and beyond