Rotate Object to a random piont
Driver with animation data as var target
There is a way to do this using the animation system via drivers to &quot;answer the question  as posed&quot;  Would look into other ways of doing this with say driving track to constraint influences to randomly located objects, or by baking an animation.
Proof of concept
Using NLA strip data as a driver target.
Have a scene with a cylinder that rotates 360 (one revolution) via a 2 keyframe action that has keyframes at 1 and 24.
It is added as a strip to NLA track &quot;NLATrack&quot; the strip has been given the arbitrary name &quot;XXX&quot;.

A cone is added to the scene with a driver on its Y Euler rotation.  It uses a method we are going to define later.  The animation data of the Cone object is single property var named &quot;ad&quot;

The script.  Defines a list of random angles choosing from  -90 to 90 degrees with 5 degree steps.
The method point takes the animation data of the cone as a variable.  From this a strip named &quot;XXX&quot; in the track &quot;NLATrack&quot; is found.
From the strip  get the repeats, from the action the action length and other info.  Haven't made a good fist of getting the maths just right by checking other strip properties like start frame etc.
For each repeat there is a random number added to a randoms list available to the driver namespace.  (Will not be saved with blend file)
The current repeat is calculated by the whole number dividing the current frame by frames in action.
How far between this and next repetition is the linearly interpolation of remainder of current frame divided by frames in action divided by frames in action.
import bpy
from bpy.app import driver_namespace as dns
from math import radians
from random import choice

dns[&quot;randoms&quot;] = dns.get(&quot;randoms&quot;, [])

def point(ad):
    if not ad:
        return 0
    frame = dns[&quot;frame&quot;] # current frame
    strip = ad.nla_tracks['NlaTrack'].strips[&quot;XXX&quot;]
    action = strip.action
    repeat = int(strip.repeat)
    nframes = int(action.frame_range.length)
    randoms = dns[&quot;randoms&quot;]
    if frame &lt; 0:
        print(&quot;Reset Randoms&quot;)
        randoms.clear()
        
    while len(randoms) &lt;= repeat + 1:
        randoms.append(radians(choice(range(-90, 90, 5))))
    
    rep = min(int(frame // nframes), repeat)
    drep = (randoms[rep+1] - randoms[rep]) 
    #return randoms[rep]
    return randoms[rep] + (frame % nframes) * drep / nframes


dns[&quot;point&quot;] = point
      

First image below shows result of uncommenting (removing hash #) from
        #return randoms[rep]


Second with the linear interp.