VHDL is a hardware description language(HDL). Your std_logic_vector is represented by wires and registers (physical components). Therefore, the size cannot change dynamically, but has to be determined pre-synthesis.
So use a std_logic_vector with the 'MAX' length you'll need, then only read the bits you need:
constant zeros : std_logic_vector(MAX-1 downto 0) := (others => '0');
signal a,b : std_logic_vector(MAX-1 downto 0);
...
a <= something;
...
b <= zeros(MAX-1 downto i) & a(i-1 downto 0); -- i is your dynamic index
This does not cover the case where you need to read the full vector though.
You could use a mask.. a bit messy :
use ieee.numeric_std.all;
...
constant mask : std_logic_vector(MAX-1 downto 0) := (others => '1');
signal a,b : std_logic_vector(MAX-1 downto 0);
...
a <= something;
...
b <= std_logic_vector(shift_right(unsigned(mask), MAX-i)) and a; -- i is your dynamic index
Not sure what you want to do exactly, but these ideas should help.