Generation of T cells for therapeutic use