You have each element of the discrete vector B is in the range 0 to the maximum of C(d) . Now what if some element of B is less than the minimum value of C(d) ? For example if C(d) is 1 + d^2 then the minimum value of C(d) over reals would be 1, but you allow elements of B to assume the value 0 even though no C(d) might happen to be 0.
More generally, you can construct C such that C(d) has a limited set of values, such as by letting C(d) be 0^d, a function whose domain is only 1 (for d = 0) and 0 (for all other d). If an element of B was 1/2, then it would not be present in C(d) for any d, and yet 1/2 would be in the range 0 to max(C(d)).
Now suppose the range of C(d) goes negative as well as positive. You use sin as an example; very well, sin(d) for real d is in the range -1 to 1, but you restrict B to 0 to max(C(d)) . This issue does not in itself lead to contradiction, but it does make it more difficult to define the mapping of d to A, is it implies that A cannot map all of the original domain for d.
Now think about sin again. sin(x) is the same as sin(x + 2*Pi) so if the domain for d is large enough, there may be multiple d that map to the same C(d). Which of those multiple possibilities do you want to use when you construct the function mapping d to A ?
Once you have ironed out these obstacles, we can proceed to the proof that what you want to do is not generally possible.