For any two points, there exist a path of $n$ segments that connects them. Is there a name for this kind of set? We consider a set $A$. $A$ is called convex if for every $x,y\in A$, we have the line segment $xy$ is also in $A$.

I want to generalize this notion, such that instead of one line segment, there can be $n$ line segment, where $n$ is some fixed number. Formally, there exist $x=a_1,a_2,\ldots,a_{n-1},a_n=y$, such that all the segments $a_1a_2$, $a_2a_3$,...,$a_{n-1}a_n$ is in $A$.

Is there a name for such sets?
Assuming you allow arbitrarily large $n$, I believe the term is "polygonally connected".
It is called the link diameter. So those sets can be called as sets with link diameter k.

An efficient algorithm for link-distance problems