Texture types

is only int, float, float4 and so on valid as texture type or can you use any type. Are there any restrictions? like only 4,8,16 byte structs?

Yes, exactly this is the restriction. So you can use types such as int2 or float2 as well. But you cannot use e.g. float3.