This is not possible. Suppose there is such a $(P, S)$. Considering continuous maps to $\{0, 1\}$, there must be a clopen set $C \subset S$ such that there is no clopen $C' \subset P$ with $C = C' \cap S$.
Now let $\kappa < \lambda$ be infinite cardinalities bigger than $|P|$ and consider the co-$\kappa$ topology on a set $X$ of size $\lambda$. Then $X$ is connected but subsets of size $\le \kappa$ are discrete. Now consider $x_1 \ne x_2 \in X$ and the map $f : S \to X$ given by $f(C) = x_1$, $f(S \setminus C) = x_2$. This has no extension $g : P \to X$ since $x_1$ would be clopen in $f(P)$ and $C' = f^{-1}(x_1)$ would satisfy $C' \cap S = C$.
In short, $(P, S)$-connectedness can only detect "connectedness of size $\le |P|$".