Q:

Associative Arrays in AHK not passing information to methods properly

I am having Issues passing an object (in the form of an associative array) into a method to click a pixel location. The information should be able to be called using the format value = arrayName[Key]
#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
CoordMode Mouse Screen
;This Area is for defining any object nessesary to interact with the game
;
;
BACKPACK_28 := {UPPER_BOUND: 964, LOWER_BOUND: 995, LEFT_BOUND: 1569, RIGHT_BOUND: 1600, MENU_KEY: "esc"}
;
;
;Ends Game Object section
^l::
select(BACKPACK_28, true)
return
select(balls, switchMenus){
    if(switchMenus==true){
        SendInput {object[MENU_KEY]}
    }
    Random, y , balls[LOWER_BOUND], balls[UPPER_BOUND]
    Random, x , balls[LEFT_BOUND], balls[RIGHT_BOUND]
    Click, x, y
}

A:

Initialize your array with quotes, like so:
BACKPACK_28 := {"UPPER_BOUND": 964, ...}

Otherwise, AHK will see UPPER_BOUND as a seperate variable.
Concerning Random, y , balls[LOWER_BOUND]: See documentation on Random:

[Param] Min: The smallest number that can be generated, which can be negative, floating point, or an expression.

If you were allowed to state a variable name here, it wouldn't say number.
Use %s to get the value of the variable:
Either
low := balls["LOWER_BOUND"]
up := balls["UPPER_BOUND"]
Random, y, %low%, %up%

or
Random, y, % balls["LOWER_BOUND"], % balls["UPPER_BOUND"]

