add support for loading constant arrays into the IR

As per the discussion with Ian, we will want to optimize these to
UBO loads, so having support for it in the IR makes things easier.