Yes, you can calculate it for any object.
In introductory courses, it might be common to see the definition being applied to simpler cases, and an important application of it is indeed the characterization of finite time series - but this measure actually was introduced precisely for investigating general attractors in finite- and infinite-dimensional systems.
When the object is not made up from a finite number of points, some sort of sampling must be performed. From the paper by Grassberger and Procacia (1983):
The measure [...] is obtained from the correlations between random points on the attractor [...] obtained e.g. from a time series