I have been tinkering with some external C++ to get a similar thing working for within-model bootstrapping, so that the (continuous) weights for the observations are generated in each draw. Not for any particular use case, but more along the lines of “can it be done”. Here is how I approached it: