Is the point of a shape with the greatest average ray length also the "centroid"? By a shape I mean one with a enclosed area. One example can be with $x^2+y^2+\sin{4x}+\sin{4y}=4$. I am dealing with implicit relations on a 2-d plane.

By the "ray length" I mean the length of the line segment from any chosen point inside the enclosed area to a point on the boundary of the shape.

Just in case you do not know how to find the average ray length you can start by converting an implicit relation into polar form. Just substitute $x=r\cos{\theta}$ and $y=r\sin{\theta}$ in $f(x,y)=0$.

Then to choose a point inside an implicit relation just convert $f(x+u,y+v)=0$ (because we want our chosen point at the pole) and with substitution get $f(r\cos\theta+u,r\sin\theta+v)$. From here you solve for $r$ In terms of $\theta$ $u$ and $v$ as $r=g(\theta)$ then take the area as $\frac{1}{2\pi}\int_{0}^{2{\pi}}g(\theta){d\theta}$ and find the $u$ and $v$ (u,v) with the greatest area. If this is not possible you could implicitly find the area under $f(r\cos\theta+u,r\sin\theta+v){d\theta}$ ,where $r&gt;0$ and the area between $0&lt;\theta&lt;2\pi$. Then divide the area by $2\pi$ and once again find the $u$ and $v$ in point (u,v) with the greatest area.

(If you are not clear with how the area should be calculated treat the polar equation as cartesian implicit function. Replace $r=y$ and $\theta=x$ to get $f(y\cos{x}+u,y\sin{x}+v)$ and then proceed.

Here is an example with the circle https://files.acrobat.com/a/preview/38a501f2-5b63-4b76-b720-6cadb9c3e142

The centroid can be found online in https://en.wikipedia.org/wiki/Centroid.

When it came to a circle and ellipse I found the point of "highest average ray length" and "center of mass" to be the same. However I am not sure how to figure this out with more complicated implicit relations like $x^2+y^2+\sin{4x}+\sin{4y}=4$. Are there any approaches to finding the difference using calculus or numerical integration?
No, consider a C-shaped area, where the center of mass is obviously outside of the shape, and cannot be within the shape. Perhaps you might want to consider convex shapes but even with those I do not believe center of mass is the point of the highest average radius. I think your idea could only (perhaps) work if you only consider the boundary of the shape and its mass (but the area within has no mass).
Consider a line segment, say with a length of one. The average radius with respect to the midpoint is $1/4$, but the average radius with respect to either endpoint is $1/2$.

If you want a $2$-dimensional example, just consider a very thin rectangle where the same argument holds.