Fix another cases where constants were not folded during elaboration
Add bounds checking for array signal assignment