Is the scalar curvature an independent quantity of the manifold? As I understand it, the scalar curvature is a function that assigns a real number between $]-\infty,\infty[$ to each point $(x,y,z,t)$ of a manifold:
$$
R:\mathbb{R}^4\to \mathbb{R}
$$
I am having difficulty picturing the scalar curvature and why it is treated as an independent quantity. Specifically, according to Wikipedia "To each point on a Riemannian manifold, it assigns a single real number determined by the intrinsic geometry of the manifold near that point.". Now, I am confused. What does $R$ being determined means in the case. Does it mean I can use the metric, or some other quantity, to solve for the scalar curvature? If this is the case, why is the Hilbert-Einstein action contain both $R$ and $g$ if $R$ is solved from $g$? If this is not the case, then the Wikipedia explanation would be inside-out; would it rather be the scalar curvature that defines the intrinsic geometric of the manifold near that point?
For a given $g$, can $R$ be any choice of arbitrary, possibly smooth, function - each choice of $R$ defining a different manifold?
 A: In Riemannian geometry, there are in principle two fundamental quantities: the metric $g$ and the connection $\nabla$. Each one may be chosen independently of the other, or even be left undefined (that is, you can have only the metric, or only the connection).
The Riemann curvature tensor $R^a{}_{bcd}$ depends only on the connection, as can be seen from its expression in a coordinate chart:
$$R^a{}_{bcd} = \partial_c \Gamma^a{}_{db} + \Gamma^a{}_{ce} \Gamma^e{}_{db} - (c \leftrightarrow d).$$
The Ricci tensor can be defined directly from this as $R_{bd} = R^a{}_{bad}$. If you also have a metric, you can define the curvature scalar as $R = g^{bd} R_{bd}$.
You can see that in general, the curvature scalar depends on both the metric and the connection. If you have one of them (say, the metric) and you want to choose $R$ as an independent quantity, you'll have to set up equations and see if you can choose the other one (the connection if you fixed the metric) so that $R$ equals your desired function; this may or may not be possible in general, I don't know.
This is the general situation, but in general relativity the connection is not independent; we use the Levi-Civita connection, which depends only on the metric, so that all the other quantities also depend only on the metric. And the same logic applies: if you want $R$ to be some specific function, you might be able to choose a metric that gives you your desired $R$, but it's not straightforward.
And to answer your last paragraph: the EH action (or the field equations) contain $R$, but it is understood that it is really a function of the metric, which we don't write out explicitly because, well, it's just $R$.
A: The curvature tells you something about the local structure through differential geometry.  That does not fully constrain the topology of the manifold, however, which is a global property.
A simple example is that the (2D) surface of a cylinder has $R=0$ everywhere, the same as the open plane.  Locally they look the same from the perspective of curvature, but globally there's a clear difference of topology since one direction is compact on the cylinder.
Now it seems that you asked a couple of different questions in the title and in the text of your original post.  Trying to answer a few of them:

*

*Knowing $R$ everywhere is not enough to tell you the global structure of the manifold.

*It's also generically true that a Riemannian manifold is typically defined as a pair $(M,g)$ of a manifold $M$ and a metric $g$.  The Ricci scalar $R$ is defined in terms of $g$ (but not explicitly $M$).

*The Ricci tensor is defined in terms of $g$ and its derivatives.  Having both $R$ and $g$ in the Einstein-Hilbert action is just a compact way of representing how the derivatives of $g$ enter the action. It's not fundamentally different than any other action that depends on a field and its derivatives.  The result of varying the action in such a case typically gives you a set partial differentials equation to solve for the fields - In this case the Einstein equation.

A: In general, you seem very focused on the scalar curvature. The scalar curvature is just one measure of curvature. A spacetime can be curved and have zero scalar curvature, as in, e.g., a gravitational wave.

For a given g, can R be any choice of arbitrary, possibly smooth, function...

No. R can be determined from g.

...each choice of R defining a different manifold?

The manifold is a topological object. Changing the metric doesn't change the manifold.

Can one prescribe both the Ricci scalar and the metric...

No. R would have to be consistent with g. It adds no information and would have to be chosen to be consistent with the metric.

and obtain a valid GR solution?

Any metric is a solution to the field equations, unless something is specified about the stress-energy.
