You can use primitive collections from Eclipse Collections and avoid boxing altogether.
DoubleList frameList = DoubleLists.mutable.empty();
double[] arr = frameList.toArray();
If you can't or don't want to initialize a DoubleList
:
List<Double> frames = new ArrayList<>();
double[] arr = ListAdapter.adapt(frames).asLazy().collectDouble(each -> each).toArray();
Note: I am a contributor to Eclipse Collections.