My current battery tray is an angle iron frame, welded to the factory location, with a small brace/clamp type pice on each side, to prevent it from sliding in any direction, or floping up, or down.
That seems to be the simplest solution.....a small rectangle shaped frame welded out of angle iron with a couple metal bands holding it down