1. A method of creating a plurality of transactional locks for a plurality of respective portions of an array object using one or more processors of a processor-based system, the method comprising: in accordance with a determining step, determining, using at least one of the one or more processors, whether a single transactional lock or the plurality of transactional locks is to be allocated for an array object based on a size of the array object, the size of the array object being less than a size threshold indicating that the single transactional lock is to be allocated for the array object, the size of the array object being greater than the size threshold indicating that the plurality of transactional locks is to be allocated for the array object; creating, using at least one of the one or more processors, a first transactional lock for a first portion of the array object; and creating, using at least one of the one or more processors, a second transactional lock for a second portion of the array object in response to a determination that the plurality of transactional locks is to be allocated for the array object.